Skip to content

Commit

Permalink
Add aliases for compressed color picker
Browse files Browse the repository at this point in the history
Signed-off-by: Miki <miki@amazon.com>
  • Loading branch information
AMoo-Miki committed Jul 11, 2024
1 parent b3c4e4e commit 6354761
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/components/color_picker/color_picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -695,3 +695,12 @@ export const OuiColorPicker: FunctionComponent<OuiColorPickerProps> = ({
</OuiPopover>
);
};

export type OuiCompressedColorPickerProps = Omit<
OuiColorPickerProps,
'compressed'
>;

export const OuiCompressedColorPicker: FunctionComponent<OuiCompressedColorPickerProps> = (
props
) => <OuiColorPicker {...props} compressed />;
7 changes: 6 additions & 1 deletion src/components/color_picker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@
* under the License.
*/

export { OuiColorPicker, OuiColorPickerProps } from './color_picker';
export {
OuiColorPicker,
OuiColorPickerProps,
OuiCompressedColorPicker,
OuiCompressedColorPickerProps,
} from './color_picker';
export {
OuiColorPickerSwatch,
OuiColorPickerSwatchProps,
Expand Down
2 changes: 2 additions & 0 deletions src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ export {
OuiColorStops,
OuiHue,
OuiSaturation,
OuiCompressedColorPicker,
OuiCompressedColorPickerProps,
} from './color_picker';

export { OuiComboBox } from './combo_box';
Expand Down

0 comments on commit 6354761

Please sign in to comment.