Skip to content

Commit

Permalink
refactor: rename useNanoClamp → $useNanoClamp
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Dec 2, 2023
1 parent 92d2c42 commit af9f3b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/react/src/components/Card/CardContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@ const CardContent = () => {
return (
<Content $cardSize={size}>
<Header $cardSize={size}>
<CardText useNanoClamp={false}>{title}</CardText>
<CardText $useNanoClamp={false}>{title}</CardText>
</Header>
{!isSmallCard && (
<Description $cardSize={size}>
<CardText lines={2}>{description}</CardText>
</Description>
)}
<Footer $cardSize={size}>
<Author useNanoClamp={false}>{formattedUrl}</Author>
<Author $useNanoClamp={false}>{formattedUrl}</Author>
<PoweredBy onClick={handleOnClick} />
</Footer>
</Content>
Expand Down
6 changes: 3 additions & 3 deletions packages/react/src/components/Card/CardText.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const StyledClamp = styled(Clamp)`
color: inherit;
margin: 0;
${({ useNanoClamp }) =>
!useNanoClamp &&
${({ $useNanoClamp }) =>
!$useNanoClamp &&
css`
overflow: hidden;
white-space: nowrap;
Expand All @@ -35,7 +35,7 @@ const CardText = ({ useNanoClamp = true, children, ...props }) => {
: { ...props, as: 'p', title: children }

return (
<StyledClamp useNanoClamp={useNanoClamp} {...textProps}>
<StyledClamp $useNanoClamp={useNanoClamp} {...textProps}>
{children}
</StyledClamp>
)
Expand Down

0 comments on commit af9f3b5

Please sign in to comment.