stream/src/components/Text/styles.js
2021-10-15 15:37:54 +02:00

35 lines
771 B
JavaScript

import styled, { css } from 'styled-components'
import { colours } from '../../assets/theme'
export const TextBase = styled.span`
${({
$size,
$fontStyle,
weight,
colour,
align,
lineHeight,
opacity = 1,
$fontFamily: fontFamily,
selectable,
underline,
$sizeUnit,
}) => css`
font-family: ${fontFamily};
font-weight: ${weight};
text-align: ${align};
color: ${colour};
line-height: ${lineHeight};
opacity: ${opacity};
user-select: ${selectable ? 'inherit' : 'none'};
text-decoration: ${underline ? 'underline' : 'none'};
font-size: ${`${$size}${$sizeUnit || 'px'}`};
font-style: ${$fontStyle};
::selection {
background-color: ${colours.midnightDarker};
color: ${colours.offwhite};
}
`}
`