Skip to content

Commit

Permalink
Supports overrides on variants
Browse files Browse the repository at this point in the history
  • Loading branch information
dzucconi committed Jul 20, 2020
1 parent 6e5729f commit 39a507a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/palette/src/elements/Text/Text.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ storiesOf("Components/Text", module)
lineHeight: "solid",
letterSpacing: "tightest",
},
{
variant: 'text',
lineHeight: 'solid'
}
]

return (
Expand Down
3 changes: 2 additions & 1 deletion packages/palette/src/elements/Text/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ export const overflowEllipsisMixin = css`
/** Text */
export const Text = styled.div<TextProps & { overflowEllipsis?: boolean }>`
${variant({ variants: TEXT_VARIANTS.small })}
${textMixin}
@media (min-width: ${themeGet("breakpoints.0")}) {
${variant({ variants: TEXT_VARIANTS.large })}
${textMixin}
}
${textMixin}
${({ overflowEllipsis }) => overflowEllipsis && overflowEllipsisMixin}
`

Expand Down

0 comments on commit 39a507a

Please sign in to comment.