feat(text): add noMargin and align props

This commit is contained in:
2021-01-27 00:11:22 +00:00
parent 283ffafa09
commit cdf55e50d4
2 changed files with 9 additions and 2 deletions

View File

@@ -84,7 +84,9 @@ export default function HeaderLogo({ transition }) {
<Heading withShadow noMargin noWrap>
Abc Project Design Ltd
</Heading>
<Text size="lg">Easy as ABC</Text>
<Text size="lg" noMargin>
Easy as ABC
</Text>
</Middle>
<Bottom visible={visible}>
<LogoArrows />

View File

@@ -3,12 +3,17 @@ import styled from "@emotion/styled";
import { css } from "@emotion/react";
const StyledText = styled.p`
margin-bottom: var(--spacing-y-xs);
margin: ${props => (props.noMargin ? 0 : `0 0 var(--spacing-y-md)`)};
${props =>
props.textStyle &&
css`
font-style: ${props.textStyle};
`}
${props =>
props.align &&
css`
text-align: ${props.align};
`}
font-size: ${props => `var(--font-size-${props.size})`};
color: ${props => `var(--theme-color-${props.color})`};
`;