-
Notifications
You must be signed in to change notification settings - Fork 842
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use display enum instead of inline boolean
- Loading branch information
1 parent
5d6fe36
commit 3453210
Showing
4 changed files
with
10 additions
and
7 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ import { | |
import { EuiHue } from './hue'; | ||
import { EuiSaturation } from './saturation'; | ||
|
||
type EuiColorPickerDisplay = 'default' | 'inline'; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
thompsongl
Author
Contributor
|
||
type EuiColorPickerMode = 'default' | 'swatch' | 'picker'; | ||
|
||
interface HTMLDivElementOverrides { | ||
|
@@ -56,6 +57,7 @@ export interface EuiColorPickerProps | |
* Use the compressed style for EuiFieldText | ||
*/ | ||
compressed?: boolean; | ||
display?: EuiColorPickerDisplay; | ||
disabled?: boolean; | ||
fullWidth?: boolean; | ||
id?: string; | ||
|
@@ -94,9 +96,9 @@ export const EuiColorPicker: FunctionComponent<EuiColorPickerProps> = ({ | |
color, | ||
compressed = false, | ||
disabled, | ||
display = 'default', | ||
fullWidth = false, | ||
id, | ||
inline = false, | ||
isInvalid, | ||
mode = 'default', | ||
onBlur, | ||
|
@@ -354,7 +356,7 @@ export const EuiColorPicker: FunctionComponent<EuiColorPickerProps> = ({ | |
); | ||
} | ||
|
||
return inline ? ( | ||
return display === 'inline' ? ( | ||
<div className={classes}>{composite}</div> | ||
) : ( | ||
<EuiPopover | ||
|
I know we're mincing words here, but what if
default
changes? I'd be more explicit and say'popover' | 'inline'