Skip to content

Commit

Permalink
feat: update layout
Browse files Browse the repository at this point in the history
  • Loading branch information
danimuller20 committed Dec 5, 2024
1 parent 6dc8f3e commit 4819079
Showing 1 changed file with 36 additions and 38 deletions.
74 changes: 36 additions & 38 deletions packages/ocean-react/src/TextListItem/TextListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,48 +96,46 @@ const TextListItem = React.forwardRef<HTMLDivElement, TextListItemProps>(

const textListitem = useMemo(
() => (
<>
<div
className={classNames('ods-text-list-item', className, {
'ods-text-list-item--with-action': withAction,
'ods-text-list-item--wide': isWide,
'ods-text-list-item--selectable': checkbox || radio,
})}
ref={ref}
{...rest}
>
<div className="ods-text-list-item__default-content">
<p className="ods-typography ods-typography__paragraph">
{title}
{tagLabel && (
<Tag type="neutral" size="medium">
{tagLabel}
</Tag>
)}
</p>
<p className="ods-typography ods-typography__description">
{description}
</p>
{caption && (
<p className="ods-typography ods-typography__captionbold">
{caption}
</p>
<div
className={classNames('ods-text-list-item', className, {
'ods-text-list-item--with-action': withAction,
'ods-text-list-item--wide': isWide,
'ods-text-list-item--selectable': checkbox || radio,
})}
ref={ref}
{...rest}
>
<div className="ods-text-list-item__default-content">
<p className="ods-typography ods-typography__paragraph">
{title}
{tagLabel && (
<Tag type="neutral" size="medium">
{tagLabel}
</Tag>
)}
</div>
{infoText && (
<p
className={classNames(
'ods-typography ods-typography__description',
'ods-text-list-item__info-text',
`ods-text-list-item__info-text--${infoTextType}`
)}
>
{infoText}
</p>
<p className="ods-typography ods-typography__description">
{description}
</p>
{caption && (
<p className="ods-typography ods-typography__captionbold">
{caption}
</p>
)}
{withAction && <ChevronRight />}
</div>
</>
{infoText && (
<p
className={classNames(
'ods-typography ods-typography__description',
'ods-text-list-item__info-text',
`ods-text-list-item__info-text--${infoTextType}`
)}
>
{infoText}
</p>
)}
{withAction && <ChevronRight />}
</div>
),
[
title,
Expand Down

0 comments on commit 4819079

Please sign in to comment.