Skip to content

Commit

Permalink
WIP on clean/price
Browse files Browse the repository at this point in the history
  • Loading branch information
LEGRELLE, Félix committed Dec 17, 2024
1 parent 739bae2 commit 6077cef
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions packages/react/components/price/Price.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,20 +102,16 @@ const Price = ({
)
}

const alignmentClasses = {
[Alignable.ALIGNED_START]: 'justified-start',
[Alignable.ALIGNED_CENTER]: 'justified-center',
[Alignable.ALIGNED_END]: 'justified-end',
}

return (
<div
id={id}
className={hashClass(
styled,
clsx(
'price-container',
is(`level-${level || '1'}`),
(align == Alignable.ALIGNED_START && is('justified-start')) ||
(align == Alignable.ALIGNED_CENTER && is('justified-center')) ||
(align == Alignable.ALIGNED_END && is('justified-end')) ||
'',
),
)}
className={hashClass(styled, clsx('price-container', is(`level-${level || '1'}`), align && is(alignmentClasses[align])))}
>
{overline && <p className={hashClass(styled, clsx('overline'))}>{overline}</p>}
{oldAmountComponent}
Expand Down

0 comments on commit 6077cef

Please sign in to comment.