diff --git a/frontend/src/bundles/common/components/button/button.tsx b/frontend/src/bundles/common/components/button/button.tsx index 522f29508..fa9006438 100644 --- a/frontend/src/bundles/common/components/button/button.tsx +++ b/frontend/src/bundles/common/components/button/button.tsx @@ -6,7 +6,7 @@ type Properties = { }; const Button: React.FC = ({ type = 'button', label }) => ( - + {label} ); diff --git a/frontend/src/bundles/common/components/components.ts b/frontend/src/bundles/common/components/components.ts index ce95bfe64..71c774689 100644 --- a/frontend/src/bundles/common/components/components.ts +++ b/frontend/src/bundles/common/components/components.ts @@ -1,11 +1,16 @@ export { Button } from './button/button.js'; export { Input } from './input/input.js'; export { Link } from './link/link.js'; +export { Loader } from './loader/loader.js'; +export { Overlay } from './overlay/overlay.js'; export { RouterProvider } from './router-provider/router-provider.js'; export { Box, + Circle, ChakraProvider as ComponentsProvider, + Flex, Heading, + Text, VStack, } from '@chakra-ui/react'; export { FormikProvider as FormProvider } from 'formik'; diff --git a/frontend/src/bundles/common/components/loader/libs/constants/constants.ts b/frontend/src/bundles/common/components/loader/libs/constants/constants.ts new file mode 100644 index 000000000..f02cfb0a2 --- /dev/null +++ b/frontend/src/bundles/common/components/loader/libs/constants/constants.ts @@ -0,0 +1 @@ +export { SPIN_ANIMATION } from './spin-animation.constant.js'; diff --git a/frontend/src/bundles/common/components/loader/libs/constants/spin-animation.constant.ts b/frontend/src/bundles/common/components/loader/libs/constants/spin-animation.constant.ts new file mode 100644 index 000000000..163609b40 --- /dev/null +++ b/frontend/src/bundles/common/components/loader/libs/constants/spin-animation.constant.ts @@ -0,0 +1,8 @@ +import { keyframes } from '@chakra-ui/react'; + +const SPIN_ANIMATION = keyframes` + 0% { transform: rotate(0deg);} + 100% { transform: rotate(360deg)} +`; + +export { SPIN_ANIMATION }; diff --git a/frontend/src/bundles/common/components/loader/loader.tsx b/frontend/src/bundles/common/components/loader/loader.tsx new file mode 100644 index 000000000..b741ded76 --- /dev/null +++ b/frontend/src/bundles/common/components/loader/loader.tsx @@ -0,0 +1,32 @@ +import { Box, Circle, Flex, Text } from '@chakra-ui/react'; + +import { SPIN_ANIMATION } from './libs/constants/constants.js'; + +const Loader = (): JSX.Element => { + return ( + + + + LOGO + + + + + Loading... + + + ); +}; + +export { Loader }; diff --git a/frontend/src/bundles/common/components/overlay/overlay.tsx b/frontend/src/bundles/common/components/overlay/overlay.tsx new file mode 100644 index 000000000..f1fc4e5ee --- /dev/null +++ b/frontend/src/bundles/common/components/overlay/overlay.tsx @@ -0,0 +1,26 @@ +import { Fade, Flex } from '@chakra-ui/react'; + +type Properties = { + isOpen: boolean; + children: React.ReactNode; +}; + +const Overlay = ({ isOpen, children }: Properties): JSX.Element => { + return ( + + + {children} + + + ); +}; + +export { Overlay }; diff --git a/frontend/src/bundles/users/components/components.ts b/frontend/src/bundles/users/components/components.ts new file mode 100644 index 000000000..dcbd2c9a1 --- /dev/null +++ b/frontend/src/bundles/users/components/components.ts @@ -0,0 +1 @@ +export { UserCard } from './user-card/user-card.js'; diff --git a/frontend/src/bundles/users/components/user-card/user-card.tsx b/frontend/src/bundles/users/components/user-card/user-card.tsx new file mode 100644 index 000000000..1d340aa6c --- /dev/null +++ b/frontend/src/bundles/users/components/user-card/user-card.tsx @@ -0,0 +1,32 @@ +import { + Button, + Circle, + Flex, + Text, + VStack, +} from '~/bundles/common/components/components.js'; + +const UserCard: React.FC = () => ( + + + {/* TODO: replace Circle and Text content with dynamic values */} + + FN + + Firstname Lastname + +