File tree Expand file tree Collapse file tree 5 files changed +21
-9
lines changed
packages/ui/src/components/compositions/InfoTable Expand file tree Collapse file tree 5 files changed +21
-9
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @ultraviolet/ui " : patch
3+ ---
4+
5+ ` InfoTable ` : remove useless styling on string cells
Original file line number Diff line number Diff line change 11import { InfoTable } from '..'
2- import { Stack } from '../../../Stack'
32
43import type { StoryFn } from '@storybook/react-vite'
54import type { ComponentProps } from 'react'
@@ -8,12 +7,10 @@ export const MultiLine: StoryFn<ComponentProps<typeof InfoTable>> = props => (
87 < InfoTable { ...props } >
98 < InfoTable . Row templateColumns = "repeat(2, 1fr)" >
109 < InfoTable . Cell title = "without multiLine" >
11- < Stack >
12- cell cell cell cell cell cell cell cell cell cell cell cell cell cell
13- cell cell cell cell cell cell cell cell cell cell cell cell cell cell
14- cell cell cell cell cell cell cell cell cell cell cell cell cell cell
15- cell cell
16- </ Stack >
10+ cell cell cell cell cell cell cell cell cell cell cell cell cell cell
11+ cell cell cell cell cell cell cell cell cell cell cell cell cell cell
12+ cell cell cell cell cell cell cell cell cell cell cell cell cell cell
13+ cell cell
1714 </ InfoTable . Cell >
1815 < InfoTable . Cell multiline title = "with multiLine" >
1916 cell cell cell cell cell cell cell cell cell cell cell cell cell cell
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ exports[`infoTable > should work with CellWithCopybutton 1`] = `
142142 title
143143 </dt >
144144 <dd
145- 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"
145+ 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"
146146 >
147147 <div
148148 class = " styles__x6hyh50 styles_alignItems_center_xxsmall__x6hyh5d styles_gap_0.5rem_xxsmall__x6hyh52j"
Original file line number Diff line number Diff line change 11'use client'
22
3+ import { cn } from '@ultraviolet/utils'
4+
35import { Stack } from '../../../Stack'
46import { Text } from '../../../Text'
57import { infoTableStyle } from '../styles.css'
@@ -37,7 +39,10 @@ export const InfoTableCell = ({
3739 </ Text >
3840 < Text
3941 as = "dd"
40- className = { infoTableStyle . desc }
42+ className = { cn (
43+ infoTableStyle . desc ,
44+ typeof children === 'string' ? '' : infoTableStyle . descFlex ,
45+ ) }
4146 oneLine = { ! multiline }
4247 prominence = "default"
4348 sentiment = "neutral"
Original file line number Diff line number Diff line change @@ -42,12 +42,16 @@ const term = style({
4242 display : 'inline-flex' ,
4343 gap : theme . space [ 1 ] ,
4444} )
45+
4546const desc = style ( {
4647 color : theme . colors . neutral . text ,
4748 margin : 0 ,
4849 minWidth : 0 ,
4950 width : '100%' ,
5051 maxWidth : '100%' ,
52+ } )
53+
54+ const descFlex = style ( {
5155 display : 'flex' ,
5256 flexDirection : 'row' ,
5357 alignItems : 'center' ,
@@ -74,5 +78,6 @@ export const infoTableStyle = {
7478 cell,
7579 term,
7680 desc,
81+ descFlex,
7782 cellWithCopyButton,
7883}
You can’t perform that action at this time.
0 commit comments