mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 21:06:42 +07:00
#38 added image preloaders
This commit is contained in:
parent
d0989ac58b
commit
92b273f377
10 changed files with 192 additions and 62 deletions
18
src/components/input/LoaderCircleInner/index.tsx
Normal file
18
src/components/input/LoaderCircleInner/index.tsx
Normal file
|
@ -0,0 +1,18 @@
|
|||
import React, { FC, HTMLAttributes, SVGAttributes } from 'react';
|
||||
import { describeArc } from '~/utils/dom';
|
||||
import styles from './styles.module.scss';
|
||||
import classNames from 'classnames';
|
||||
|
||||
interface IProps extends SVGAttributes<SVGElement> {
|
||||
size: number;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const LoaderCircleInner: FC<IProps> = ({ size, className, ...props }) => (
|
||||
<svg className={classNames(styles.icon, className)} width={size} height={size} {...props}>
|
||||
<path d={describeArc(size / 2, size / 2, size / 2, 0, 90)} />
|
||||
<path d={describeArc(size / 2, size / 2, size / 2, 180, 270)} />
|
||||
</svg>
|
||||
);
|
||||
|
||||
export { LoaderCircleInner };
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
.icon {
|
||||
fill: transparentize(black, 0.6);
|
||||
stroke: none;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue