Initial commit
This commit is contained in:
12
src/components/loading/index.tsx
Normal file
12
src/components/loading/index.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
type LoadingProps = {
|
||||
loading?: boolean;
|
||||
children?: React.ReactNode;
|
||||
};
|
||||
export const Loading = (props: LoadingProps) => {
|
||||
if (!props.loading) return <>{props.children}</>;
|
||||
return (
|
||||
<div className='w-full h-full flex justify-center items-center'>
|
||||
<div className='w-20 h-20 border-t-8 border-b-8 rounded-full animate-spin'></div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
6
src/components/modal/container.tsx
Normal file
6
src/components/modal/container.tsx
Normal file
@@ -0,0 +1,6 @@
|
||||
export const ForModal = () => {
|
||||
return <div id='for-modal'></div>;
|
||||
};
|
||||
export const getContainer = () => {
|
||||
return document.querySelector('#for-modal')!;
|
||||
};
|
||||
1
src/components/modal/index.tsx
Normal file
1
src/components/modal/index.tsx
Normal file
@@ -0,0 +1 @@
|
||||
export * from './container'
|
||||
Reference in New Issue
Block a user