Skip to content

Commit

Permalink
🐛 Fix price align
Browse files Browse the repository at this point in the history
  • Loading branch information
LEGRELLE, Félix committed Dec 17, 2024
1 parent 44f4c6f commit 739bae2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
11 changes: 3 additions & 8 deletions examples/react-template/screens/Price.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,13 @@ export const PriceScreen = (): JSX.Element => {

<Price level={2} amount={18.99} />

<Divider />
<Title level={TitleLevels.THREE}>Inlined</Title>

<Price level={7} amount={1000} mention='(1)' period='months' />

<Divider />
<Title level={TitleLevels.THREE}>Alignement</Title>
<Price level={1} amount={1000} mention='(1)' period='months' />
<Price level={1} amount={1000} mention='(1)' period='months' align={Alignable.ALIGNED_START} />

<Price level={1} amount={1000} mention='(1)' period='months' />
<Price level={1} amount={1000} mention='(1)' period='months' align={Alignable.ALIGNED_CENTER} />

<Price level={1} amount={1000} mention='(1)' period='months' />
<Price level={1} amount={1000} mention='(1)' period='months' align={Alignable.ALIGNED_END} />

<Divider />

Expand Down
4 changes: 2 additions & 2 deletions packages/react/components/price/Price.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ const Price = ({
clsx(
'price-container',
is(`level-${level || '1'}`),
(align == Alignable.ALIGNED_START && is('justified-left')) ||
(align == Alignable.ALIGNED_START && is('justified-start')) ||
(align == Alignable.ALIGNED_CENTER && is('justified-center')) ||
(align == Alignable.ALIGNED_END && is('justified-right')) ||
(align == Alignable.ALIGNED_END && is('justified-end')) ||
'',
),
)}
Expand Down

0 comments on commit 739bae2

Please sign in to comment.