mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
add "welcome" page
This commit is contained in:
parent
e7d0c83686
commit
81fba4a1be
16 changed files with 360 additions and 10 deletions
31
src/components/welcome/WelcomeSlideWrapper/index.tsx
Normal file
31
src/components/welcome/WelcomeSlideWrapper/index.tsx
Normal file
|
@ -0,0 +1,31 @@
|
|||
import { FC, PropsWithChildren, useMemo } from 'react';
|
||||
|
||||
import styles from './styles.module.scss';
|
||||
|
||||
interface Props {
|
||||
background?: string;
|
||||
color?: string;
|
||||
}
|
||||
|
||||
const WelcomeSlideWrapper: FC<PropsWithChildren<Props>> = ({
|
||||
children,
|
||||
color,
|
||||
background = '',
|
||||
}) => {
|
||||
const style = useMemo(
|
||||
() =>
|
||||
background || color
|
||||
? {
|
||||
backgroundImage: background && `url(${background})`,
|
||||
backgroundColor: color,
|
||||
}
|
||||
: undefined,
|
||||
[background, color],
|
||||
);
|
||||
return (
|
||||
<div className={styles.layout} style={style}>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
export { WelcomeSlideWrapper };
|
|
@ -0,0 +1,9 @@
|
|||
@import 'src/styles/variables';
|
||||
|
||||
.layout {
|
||||
min-height: 100vh;
|
||||
width: 100vw;
|
||||
background-size: cover;
|
||||
background-position: 50% 50%;
|
||||
padding: $header_height 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue