UNPKG

@ui5/webcomponents-react

Version:

React Wrapper for UI5 Web Components and additional components

34 lines (33 loc) 1.6 kB
import '@ui5/webcomponents/dist/ColorPalette.js'; import type { ColorPaletteItemClickEventDetail } from '@ui5/webcomponents/dist/ColorPalette.js'; import type { ReactNode } from 'react'; import type { CommonProps, Ui5CustomEvent, Ui5DomRef } from '../../types/index.js'; interface ColorPaletteAttributes { } interface ColorPaletteDomRef extends Required<ColorPaletteAttributes>, Ui5DomRef { } interface ColorPalettePropTypes extends ColorPaletteAttributes, Omit<CommonProps, 'children' | 'onItemClick'> { /** * Defines the `ColorPaletteItem` elements. */ children?: ReactNode | ReactNode[]; /** * Fired when the user selects a color. */ onItemClick?: (event: Ui5CustomEvent<ColorPaletteDomRef, ColorPaletteItemClickEventDetail>) => void; } /** * The `ColorPalette` provides the users with a range of predefined colors. The colors are fixed and do not change with the theme. * * ### Usage * * The `ColorPalette` is meant for users that need to select a color from a predefined set. * To define the colors, use the `ColorPaletteItem` component inside the default slot of the `ColorPalette`. * * * * __Note__: This is a UI5 Web Component! [Repository](https://github.com/SAP/ui5-webcomponents) | [Documentation](https://sap.github.io/ui5-webcomponents/) */ declare const ColorPalette: import("react").ForwardRefExoticComponent<ColorPalettePropTypes & import("../../internal/withWebComponent.js").WithWebComponentPropTypes & import("react").RefAttributes<ColorPaletteDomRef>>; export { ColorPalette }; export type { ColorPaletteDomRef, ColorPalettePropTypes };