Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export composable pieces of List/Item #1280

Merged
merged 6 commits into from
Jun 9, 2021
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/ActionList/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,10 @@ const StyledItem = styled.div<
${sx}
`

const StyledTextContainer = styled.div<{descriptionVariant: ItemProps['descriptionVariant']}>`
export const TextContainer = styled.div<{
dangerouslySetInnerHtml?: {__html: string}
VanAnderson marked this conversation as resolved.
Show resolved Hide resolved
descriptionVariant: ItemProps['descriptionVariant']
}>`
display: flex;
min-width: 0;
flex-grow: 1;
Expand Down Expand Up @@ -393,7 +396,7 @@ export function Item(itemProps: Partial<ItemProps> & {item?: ItemInput}): JSX.El
<StyledItemContent>
{children}
{(text || description) && (
<StyledTextContainer descriptionVariant={descriptionVariant}>
<TextContainer descriptionVariant={descriptionVariant}>
{text && <div>{text}</div>}
{description && (
<DescriptionContainer descriptionVariant={descriptionVariant}>
Expand All @@ -406,7 +409,7 @@ export function Item(itemProps: Partial<ItemProps> & {item?: ItemInput}): JSX.El
)}
</DescriptionContainer>
)}
</StyledTextContainer>
</TextContainer>
)}
{(TrailingIcon || trailingText) && (
<TrailingVisualContainer variant={variant} disabled={disabled}>
Expand Down