Skip to content

Commit

Permalink
feat(Text): support strike style
Browse files Browse the repository at this point in the history
  • Loading branch information
awinogradov committed Oct 11, 2023
1 parent 93bb57f commit 4d3dcdb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/Text/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export interface TextProps extends React.HTMLAttributes<HTMLDivElement> {
weight?: keyof typeof textWeight;
color?: string;
ellipsis?: boolean;
strike?: boolean;
lines?: number;
wordWrap?: React.CSSProperties['wordWrap'];
wordBreak?: React.CSSProperties['wordBreak'];
Expand All @@ -59,6 +60,7 @@ export const Text = styled(
size,
weight,
ellipsis,
strike,
lines,
wordBreak,
wordWrap,
Expand Down Expand Up @@ -117,6 +119,12 @@ export const Text = styled(
`
word-break: ${wordBreak};
`}
${({ strike }) =>
strike &&
css`
text-decoration: line-through;
`}
`;

export const TextStyle = createGlobalStyle`
Expand Down

0 comments on commit 4d3dcdb

Please sign in to comment.