Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable custom classnames on <CustomSelectControl> options #23045

Merged
merged 2 commits into from
Jun 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/components/src/custom-select-control/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ The label for the control.
#### options

The options that can be chosen from.
- Type: `Array<{ key: String, name: String, style: ?{}, ...rest }>`
- Type: `Array<{ key: String, name: String, style: ?{}, className: ?String, ...rest }>`
- Required: Yes

#### onChange
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/custom-select-control/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ export default function CustomSelectControl( {
index,
key: item.key,
className: classnames(
item.className,
'components-custom-select-control__item',
{
'is-highlighted':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const defaultOptions = [
key: 'normal',
name: 'Normal',
style: { fontSize: '100%' },
className: 'can-apply-custom-class-to-option',
},
{
key: 'large',
Expand Down