MCPcopy Index your code
hub / github.com/primer/react / TrailingVisual

Function TrailingVisual

packages/react/src/ActionList/Visuals.tsx:55–78  ·  view source on GitHub ↗
({sx = {}, ...props})

Source from the content-addressed store, hash-verified

53
54export type ActionListTrailingVisualProps = VisualProps
55export 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}

Callers

nothing calls this directly

Calls 1

getVariantStylesFunction · 0.90

Tested by

no test coverage detected