File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
packages/orchestrator-ui-components/src/components/WfoKeyValueTable Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -24,17 +24,20 @@ export const WfoValueCell: FC<WfoValueCellProps> = ({
2424 const {
2525 clipboardIconSize,
2626 clipboardIconStyle,
27- clickable ,
27+ clickableStyle ,
2828 getBackgroundColorStyleForRow,
2929 valueColumnStyle,
3030 valueCellStyle,
3131 } = useWithOrchestratorTheme ( getStyles ) ;
3232
3333 const shouldRenderCopyColumn = enableCopyIcon && textToCopy ;
3434
35- const valueToRender = React . isValidElement ( value )
36- ? value
37- : JSON . stringify ( value ) ;
35+ const valueToRender =
36+ typeof value === 'string' ||
37+ typeof value === 'number' ||
38+ React . isValidElement ( value )
39+ ? value
40+ : JSON . stringify ( value ) ;
3841
3942 const copyText =
4043 typeof textToCopy === 'object'
@@ -48,7 +51,7 @@ export const WfoValueCell: FC<WfoValueCellProps> = ({
4851 { shouldRenderCopyColumn && (
4952 < EuiCopy textToCopy = { copyText || '' } >
5053 { ( copy ) => (
51- < div onClick = { copy } css = { clickable } >
54+ < div onClick = { copy } css = { clickableStyle } >
5255 < WfoClipboardCopy
5356 width = { clipboardIconSize }
5457 height = { clipboardIconSize }
Original file line number Diff line number Diff line change @@ -73,9 +73,10 @@ export const getStyles = ({ theme }: WfoTheme) => {
7373 paddingBottom : 0 ,
7474 } ) ;
7575
76- const clickable = css ( {
76+ const clickableStyle = css ( {
7777 marginLeft : clipboardIconMargin ,
7878 cursor : 'pointer' ,
79+ paddingRight : theme . size . s ,
7980 } ) ;
8081
8182 return {
@@ -87,7 +88,7 @@ export const getStyles = ({ theme }: WfoTheme) => {
8788 keyCellStyle,
8889 valueCellStyle,
8990 clipboardIconStyle,
90- clickable ,
91+ clickableStyle ,
9192 lightBackground,
9293 darkBackground,
9394 getBackgroundColorStyleForRow,
You can’t perform that action at this time.
0 commit comments