mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-16 01:29:09 +00:00
feat: add skeleton masthead and generic loading page (#182)
* feat: add skeleton masthead and generic loading page * add generic loader to picker page * smooth out spinner, add no-motion state
This commit is contained in:
parent
fa85b30cf0
commit
e0fcfc310e
28 changed files with 380 additions and 30 deletions
|
@ -7,3 +7,4 @@ export default {
|
|||
|
||||
export const Dark = () => <DotOverlay />;
|
||||
export const Light = () => <DotOverlay light />;
|
||||
export const Skeleton = () => <DotOverlay skeleton />;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import { animateOpacity } from '@roleypoly/design-system/atoms/placeholder';
|
||||
import * as React from 'react';
|
||||
import styled from 'styled-components';
|
||||
|
||||
|
@ -33,6 +34,22 @@ const DotOverlayLight = styled(dotOverlayBase)`
|
|||
);
|
||||
`;
|
||||
|
||||
export const DotOverlay = ({ light }: { light?: boolean }) => {
|
||||
return light ? <DotOverlayLight /> : <DotOverlayDark />;
|
||||
const DotOverlaySkeleton = styled(DotOverlayDark)`
|
||||
${animateOpacity}
|
||||
`;
|
||||
|
||||
export const DotOverlay = ({
|
||||
light,
|
||||
skeleton,
|
||||
}: {
|
||||
light?: boolean;
|
||||
skeleton?: boolean;
|
||||
}) => {
|
||||
return skeleton ? (
|
||||
<DotOverlaySkeleton />
|
||||
) : light ? (
|
||||
<DotOverlayLight />
|
||||
) : (
|
||||
<DotOverlayDark />
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue