chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
.root {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.message {
|
||||
margin-top: 25px;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { Meta, StoryFn } from '@storybook/react-webpack5';
|
||||
|
||||
import { ViewLoading } from './ViewLoading';
|
||||
|
||||
export default {
|
||||
component: ViewLoading,
|
||||
title: 'Components/ViewLoading',
|
||||
} as Meta;
|
||||
|
||||
interface Args {
|
||||
message: string;
|
||||
}
|
||||
|
||||
function Template({ message }: Args) {
|
||||
return <ViewLoading message={message} />;
|
||||
}
|
||||
|
||||
export const Example: StoryFn<Args> = Template.bind({});
|
||||
Example.args = {
|
||||
message: 'Loading...',
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
import clsx from 'clsx';
|
||||
|
||||
import styles from './ViewLoading.module.css';
|
||||
|
||||
interface Props {
|
||||
message?: string;
|
||||
}
|
||||
|
||||
export function ViewLoading({ message }: Props) {
|
||||
return (
|
||||
<div className={clsx('row', styles.root)}>
|
||||
<div className="sk-fold">
|
||||
<div className="sk-fold-cube" />
|
||||
<div className="sk-fold-cube" />
|
||||
<div className="sk-fold-cube" />
|
||||
<div className="sk-fold-cube" />
|
||||
</div>
|
||||
{message && <span className={styles.message}>{message}</span>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export { ViewLoading } from './ViewLoading';
|
||||
Reference in New Issue
Block a user