@sanity/tsdoc
Version:
Generate API reference docs from TypeScript projects and store in a Sanity-friendly JSON format. Render a static frontend, or as React components.
21 lines (17 loc) • 529 B
text/typescript
import {type Theme, TreeItem} from '@sanity/ui'
import {memo} from 'react'
import {styled} from 'styled-components'
export const TreeItemFocus = memo(
styled(TreeItem)(({theme}: {theme: Theme}) => {
const text = theme.sanity.color.selectable!.default.enabled.fg
return `
&:focus > [data-ui='TreeItem__box'],
&:focus > [data-ui="TreeItem"] {
background-color: transparent !important;
& svg, & code, & [data-ui="Text"] {
color: ${text} !important;
}
}
`
}),
)