({sx = {}, ...props})
| 53 | |
| 54 | export type ActionListTrailingVisualProps = VisualProps |
| 55 | export const TrailingVisual: React.FC<React.PropsWithChildren<VisualProps>> = ({sx = {}, ...props}) => { |
| 56 | const {variant, disabled, inactive} = React.useContext(ItemContext) |
| 57 | return ( |
| 58 | <Box |
| 59 | as="span" |
| 60 | sx={merge( |
| 61 | { |
| 62 | height: '20px', // match height of text row |
| 63 | flexShrink: 0, |
| 64 | color: getVariantStyles(variant, disabled, inactive).annotationColor, |
| 65 | marginLeft: 2, |
| 66 | fontWeight: 'initial', |
| 67 | '[data-variant="danger"]:hover &, [data-variant="danger"]:active &': { |
| 68 | color: getVariantStyles(variant, disabled, inactive).hoverColor, |
| 69 | }, |
| 70 | }, |
| 71 | sx as SxProp, |
| 72 | )} |
| 73 | {...props} |
| 74 | > |
| 75 | {props.children} |
| 76 | </Box> |
| 77 | ) |
| 78 | } |
nothing calls this directly
no test coverage detected