2020-10-16 13:16:01 +00:00
|
|
|
import { css } from "styled-components";
|
2019-12-04 09:36:13 +00:00
|
|
|
|
|
|
|
const commonTextStyles = css`
|
2021-02-04 15:55:24 +00:00
|
|
|
font-family: ${(props) => props.theme.fontFamily};
|
2020-10-16 13:16:01 +00:00
|
|
|
text-align: ${(props) => props.textAlign};
|
2021-02-15 16:15:27 +00:00
|
|
|
color: ${(props) =>
|
|
|
|
props.colorProp ? props.colorProp : props.theme.text.color};
|
2020-10-16 13:16:01 +00:00
|
|
|
${(props) =>
|
|
|
|
props.truncate &&
|
|
|
|
css`
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
`}
|
2019-12-04 09:36:13 +00:00
|
|
|
`;
|
|
|
|
|
2020-10-16 13:16:01 +00:00
|
|
|
export default commonTextStyles;
|