Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions .changeset/brown-sails-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ultraviolet/ui": patch
---

`InfoTable`: remove useless styling on string cells
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { InfoTable } from '..'
import { Stack } from '../../../Stack'

import type { StoryFn } from '@storybook/react-vite'
import type { ComponentProps } from 'react'
Expand All @@ -8,12 +7,10 @@ export const MultiLine: StoryFn<ComponentProps<typeof InfoTable>> = props => (
<InfoTable {...props}>
<InfoTable.Row templateColumns="repeat(2, 1fr)">
<InfoTable.Cell title="without multiLine">
<Stack>
cell cell cell cell cell cell cell cell cell cell cell cell cell cell
cell cell cell cell cell cell cell cell cell cell cell cell cell cell
cell cell cell cell cell cell cell cell cell cell cell cell cell cell
cell cell
</Stack>
cell cell cell cell cell cell cell cell cell cell cell cell cell cell
cell cell cell cell cell cell cell cell cell cell cell cell cell cell
cell cell cell cell cell cell cell cell cell cell cell cell cell cell
cell cell
</InfoTable.Cell>
<InfoTable.Cell multiline title="with multiLine">
cell cell cell cell cell cell cell cell cell cell cell cell cell cell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ exports[`infoTable > should work with CellWithCopybutton 1`] = `
title
</dt>
<dd
class="styles__dvjyo45 style__m4c9ow0 style_oneLine_true__m4c9ow3 style_prominence_default__m4c9ow4 style_sentiment_neutral__m4c9owb style_variant_body__m4c9owj style_undefined_compound_0__m4c9ow1a style_undefined_compound_64__m4c9ow32"
class="styles__dvjyo45 styles__dvjyo46 style__m4c9ow0 style_oneLine_true__m4c9ow3 style_prominence_default__m4c9ow4 style_sentiment_neutral__m4c9owb style_variant_body__m4c9owj style_undefined_compound_0__m4c9ow1a style_undefined_compound_64__m4c9ow32"
>
<div
class="styles__x6hyh50 styles_alignItems_center_xxsmall__x6hyh5d styles_gap_0.5rem_xxsmall__x6hyh52j"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use client'

import { cn } from '@ultraviolet/utils'

import { Stack } from '../../../Stack'
import { Text } from '../../../Text'
import { infoTableStyle } from '../styles.css'
Expand Down Expand Up @@ -37,7 +39,10 @@ export const InfoTableCell = ({
</Text>
<Text
as="dd"
className={infoTableStyle.desc}
className={cn(
infoTableStyle.desc,
typeof children === 'string' ? '' : infoTableStyle.descFlex,
)}
oneLine={!multiline}
prominence="default"
sentiment="neutral"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,16 @@ const term = style({
display: 'inline-flex',
gap: theme.space[1],
})

const desc = style({
color: theme.colors.neutral.text,
margin: 0,
minWidth: 0,
width: '100%',
maxWidth: '100%',
})

const descFlex = style({
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
Expand All @@ -74,5 +78,6 @@ export const infoTableStyle = {
cell,
term,
desc,
descFlex,
cellWithCopyButton,
}
Loading