Skip to content

Commit

Permalink
fix: fix ellipsis content component styles (#489)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fran McDade authored and Fran McDade committed Nov 22, 2023
1 parent 8ac7028 commit ac0d450
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { css } from "@emotion/react";
import styled from "@emotion/styled";
import { ButtonTextPrimary } from "../Button/components/ButtonTextPrimary/buttonTextPrimary";

Expand All @@ -8,12 +9,13 @@ interface Props {

export const Content = styled("div")<Props>`
${({ isEllipsis, maxLineCount }) =>
`
-webkit-box-orient: vertical;
display: -webkit-box;
-webkit-line-clamp: ${isEllipsis ? maxLineCount : "unset"};
overflow: hidden;
`}
isEllipsis &&
css`
-webkit-box-orient: vertical;
display: -webkit-box;
-webkit-line-clamp: ${maxLineCount};
overflow: hidden;
`}
`;

export const Button = styled(ButtonTextPrimary)`
Expand Down

0 comments on commit ac0d450

Please sign in to comment.