feat(website): init

This commit is contained in:
moklick
2020-10-05 10:14:49 +02:00
parent f54b93b319
commit 277e032770
140 changed files with 30517 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
import React from 'react';
import styled from '@emotion/styled';
import { useTheme } from 'emotion-theming';
import WbkdLogoWhite from 'assets/images/logo-white.svg';
import WbkdLogoBlack from 'assets/images/logo.svg';
const Image = styled.img`
display: block;
width: 75px;
`;
const getLogoSrc = (type, inverted, theme) => {
if (type) {
return type === 'white' ? WbkdLogoWhite : WbkdLogoBlack;
}
if (inverted) {
return theme.name === 'light' ? WbkdLogoWhite : WbkdLogoBlack;
}
return theme.name === 'light' ? WbkdLogoBlack : WbkdLogoWhite;
};
export default ({ type = null, inverted = false, style = {} }) => {
const theme = useTheme();
const logoSrc = getLogoSrc(type, inverted, theme);
return <Image src={logoSrc} alt="webkid logo" style={style} />;
};