stream/src/components/Text/styles.js

32 lines
710 B
JavaScript
Raw Normal View History

import styled, { css } from 'styled-components'
import { colours } from '../../assets/theme'
export const TextBase = styled.span`
${({
2021-03-11 20:24:44 +00:00
$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'};
2021-03-11 20:24:44 +00:00
font-size: ${$size}px;
::selection {
background-color: ${colours.midnightDarker};
color: ${colours.offwhite};
}
`}
`