-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
120 additions
and
30 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
docs/data/translations/api-docs/select-option/select-option.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"componentDescription": "", | ||
"propDescriptions": { | ||
"disabled": { "description": "If <code>true</code>, the select option will be disabled." }, | ||
"label": { | ||
"description": "A text representation of the select option's content. Used for keyboard text navigation matching." | ||
}, | ||
"onClick": { "description": "The click handler for the select option." }, | ||
"value": { "description": "The value of the select option." } | ||
}, | ||
"classDescriptions": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 21 additions & 26 deletions
47
packages/mui-base/src/Select/OptionIndicator/SelectOptionIndicator.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,23 @@ | ||
// import * as React from 'react'; | ||
// import { Select } from '@base_ui/react/Select'; | ||
// import { createRenderer, describeConformance } from '#test-utils'; | ||
// import { SelectOptionContext } from '../Option/SelectOptionContext'; | ||
import * as React from 'react'; | ||
import { Select } from '@base_ui/react/Select'; | ||
import { createRenderer, describeConformance } from '#test-utils'; | ||
|
||
// const selectItemContextValue = { | ||
// open: true, | ||
// selected: true, | ||
// }; | ||
describe('<Select.OptionIndicator />', () => { | ||
const { render } = createRenderer(); | ||
|
||
// describe('<Select.OptionIndicator />', () => { | ||
// const { render } = createRenderer(); | ||
|
||
// describeConformance(<Select.OptionIndicator />, () => ({ | ||
// refInstanceof: window.HTMLSpanElement, | ||
// render(node) { | ||
// return render( | ||
// <Select.Root open animated={false}> | ||
// <Select.Positioner> | ||
// <SelectOptionContext.Provider value={selectItemContextValue}> | ||
// {node} | ||
// </SelectOptionContext.Provider> | ||
// </Select.Positioner> | ||
// </Select.Root>, | ||
// ); | ||
// }, | ||
// })); | ||
// }); | ||
describeConformance(<Select.OptionIndicator />, () => ({ | ||
refInstanceof: window.HTMLSpanElement, | ||
render(node) { | ||
return render( | ||
<Select.Root open animated={false}> | ||
<Select.Trigger> | ||
<Select.Value /> | ||
</Select.Trigger> | ||
<Select.Positioner> | ||
<Select.Option>{node}</Select.Option> | ||
</Select.Positioner> | ||
</Select.Root>, | ||
); | ||
}, | ||
})); | ||
}); |