mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 02:13:33 +00:00
Add files
This commit is contained in:
commit
e87c814068
266 changed files with 63938 additions and 0 deletions
39
src/renderer/components/skeleton/index.tsx
Normal file
39
src/renderer/components/skeleton/index.tsx
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
import type { SkeletonProps as MantineSkeletonProps } from '@mantine/core';
|
||||
import { Skeleton as MantineSkeleton } from '@mantine/core';
|
||||
import styled from 'styled-components';
|
||||
|
||||
const StyledSkeleton = styled(MantineSkeleton)`
|
||||
@keyframes run {
|
||||
0% {
|
||||
left: 0;
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
80% {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
}
|
||||
|
||||
&::before {
|
||||
background: var(--skeleton-bg);
|
||||
}
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
background: linear-gradient(90deg, transparent, var(--skeleton-bg), transparent);
|
||||
transform: translateX(-100%);
|
||||
animation-name: run;
|
||||
animation-duration: 1.5s;
|
||||
animation-timing-function: linear;
|
||||
content: '';
|
||||
inset: 0;
|
||||
}
|
||||
`;
|
||||
|
||||
export const Skeleton = ({ ...props }: MantineSkeletonProps) => {
|
||||
return <StyledSkeleton {...props} />;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue