Skip to content

Commit c1e605a

Browse files
committed
feat: add data-key-toggle-* class name for customization
1 parent 2c85bdb commit c1e605a

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

docs/pages/how-to/styling.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@ Different part of the dom structure will have class names like `data-object-star
6969

7070
This is the list of class names. 🧐
7171

72+
- `data-key`
7273
- `data-key-pair`
74+
- `data-key-key`
75+
- `data-key-colon`
76+
- `data-key-toggle-expanded`
77+
- `data-key-toggle-collapsed`
7378
- `data-type-label`
7479
- `data-object`
7580
- `data-object-start`

src/components/DataKeyPair.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ export const DataKeyPair: FC<DataKeyPairProps> = (props) => {
344344
? (inspect
345345
? (
346346
<ExpandMoreIcon
347+
className='data-key-toggle-expanded'
347348
sx={{
348349
fontSize: '.8rem',
349350
'&:hover': { cursor: 'pointer' }
@@ -352,6 +353,7 @@ export const DataKeyPair: FC<DataKeyPairProps> = (props) => {
352353
)
353354
: (
354355
<ChevronRightIcon
356+
className='data-key-toggle-collapsed'
355357
sx={{
356358
fontSize: '.8rem',
357359
'&:hover': { cursor: 'pointer' }

0 commit comments

Comments
 (0)