1
0
Fork 0
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:
Fedor Katurov 2023-11-05 18:07:17 +06:00
parent e7d0c83686
commit 81fba4a1be
16 changed files with 360 additions and 10 deletions

View 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 };

View file

@ -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;
}