-
Notifications
You must be signed in to change notification settings - Fork 3
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
11 changed files
with
127 additions
and
104 deletions.
There are no files selected for viewing
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
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
10 changes: 6 additions & 4 deletions
10
packages/react/src/components/select/custom/custom-option-group.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,16 +1,18 @@ | ||
import React from 'react'; | ||
|
||
export interface CustomOptionGroupProps extends JsxDiv { | ||
label?: string; | ||
} | ||
|
||
export const CustomOptionGroup = ({ | ||
children, | ||
label, | ||
...props | ||
}: CustomOptionGroupProps): JSX.Element => ( | ||
}: CustomOptionGroupProps) => ( | ||
<div {...props}> | ||
{label} | ||
{children} | ||
</div> | ||
); | ||
|
||
export type CustomOptionGroupProps = JSX.IntrinsicElements['div'] & { | ||
label?: string; | ||
}; | ||
type JsxDiv = JSX.IntrinsicElements['div']; |
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
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
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
8 changes: 4 additions & 4 deletions
8
packages/react/src/components/select/native/native-option-group.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,7 +1,7 @@ | ||
import React from 'react'; | ||
|
||
export const NativeOptionGroup = ( | ||
props: NativeOptionGroupProps | ||
): JSX.Element => <optgroup {...props} />; | ||
|
||
export type NativeOptionGroupProps = JSX.IntrinsicElements['optgroup']; | ||
|
||
export const NativeOptionGroup = (props: NativeOptionGroupProps) => ( | ||
<optgroup {...props} /> | ||
); |
6 changes: 2 additions & 4 deletions
6
packages/react/src/components/select/native/native-option.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,7 +1,5 @@ | ||
import React from 'react'; | ||
|
||
export const NativeOption = (props: NativeOptionProps): JSX.Element => ( | ||
<option {...props} /> | ||
); | ||
|
||
export type NativeOptionProps = JSX.IntrinsicElements['option']; | ||
|
||
export const NativeOption = (props: NativeOptionProps) => <option {...props} />; |
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
Oops, something went wrong.