Skip to content

Commit

Permalink
feat: add data-key-toggle-* class name for customization
Browse files Browse the repository at this point in the history
  • Loading branch information
pionxzh committed Aug 26, 2024
1 parent 2c85bdb commit c1e605a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/pages/how-to/styling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@ Different part of the dom structure will have class names like `data-object-star

This is the list of class names. 🧐

- `data-key`
- `data-key-pair`
- `data-key-key`
- `data-key-colon`
- `data-key-toggle-expanded`
- `data-key-toggle-collapsed`
- `data-type-label`
- `data-object`
- `data-object-start`
Expand Down
2 changes: 2 additions & 0 deletions src/components/DataKeyPair.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ export const DataKeyPair: FC<DataKeyPairProps> = (props) => {
? (inspect
? (
<ExpandMoreIcon
className='data-key-toggle-expanded'
sx={{
fontSize: '.8rem',
'&:hover': { cursor: 'pointer' }
Expand All @@ -352,6 +353,7 @@ export const DataKeyPair: FC<DataKeyPairProps> = (props) => {
)
: (
<ChevronRightIcon
className='data-key-toggle-collapsed'
sx={{
fontSize: '.8rem',
'&:hover': { cursor: 'pointer' }
Expand Down

0 comments on commit c1e605a

Please sign in to comment.