2021-03-05 13:37:53 +00:00
|
|
|
import styled, { css } from 'styled-components'
|
2021-03-10 13:51:24 +00:00
|
|
|
import { colours } from '../../assets/theme'
|
2021-03-05 13:37:53 +00:00
|
|
|
|
|
|
|
export const TextBase = styled.span`
|
|
|
|
${({
|
|
|
|
size,
|
|
|
|
weight,
|
|
|
|
colour,
|
|
|
|
align,
|
|
|
|
lineHeight,
|
|
|
|
opacity = 1,
|
|
|
|
$fontFamily: fontFamily,
|
|
|
|
selectable,
|
|
|
|
underline,
|
|
|
|
}) => 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}px;
|
2021-03-10 13:51:24 +00:00
|
|
|
|
|
|
|
::selection {
|
|
|
|
background-color: ${colours.midnightDarker};
|
|
|
|
color: ${colours.offwhite};
|
|
|
|
}
|
2021-03-05 13:37:53 +00:00
|
|
|
`}
|
|
|
|
`
|