({
children,
onClick,
}: {
children: React.ReactNode
onClick: () => void
})
| 15 | |
| 16 | /** A small status-bar action button with hover-bold styling. */ |
| 17 | const StatusActionButton = ({ |
| 18 | children, |
| 19 | onClick, |
| 20 | }: { |
| 21 | children: React.ReactNode |
| 22 | onClick: () => void |
| 23 | }) => { |
| 24 | const theme = useTheme() |
| 25 | const [hovered, setHovered] = useState(false) |
| 26 | |
| 27 | return ( |
| 28 | <Button |
| 29 | style={{ paddingLeft: 1, paddingRight: 1 }} |
| 30 | onClick={onClick} |
| 31 | onMouseOver={() => setHovered(true)} |
| 32 | onMouseOut={() => setHovered(false)} |
| 33 | > |
| 34 | <text> |
| 35 | <span |
| 36 | fg={theme.secondary} |
| 37 | attributes={hovered ? TextAttributes.BOLD : TextAttributes.NONE} |
| 38 | > |
| 39 | {children} |
| 40 | </span> |
| 41 | </text> |
| 42 | </Button> |
| 43 | ) |
| 44 | } |
| 45 | |
| 46 | const SHIMMER_INTERVAL_MS = 160 |
| 47 |
nothing calls this directly
no test coverage detected