UNPKG

@geneui/components

Version:

The Gene UI components library designed for BI tools

71 lines (70 loc) 2.28 kB
import { FC, MouseEvent, KeyboardEvent, ReactNode } from 'react'; import Switcher from '../../atoms/Switcher'; import { IHTMLDivElementAttributes } from '../../../types'; import './InteractiveWidget.scss'; interface IInteractiveWidgetProps extends IHTMLDivElementAttributes { /** * Show/Hide border. */ withBorder?: boolean; /** * Additional className will be applied on the wrapper element. */ className?: string; /** * Fires an event on Widget click `((event: Event) => void)`. */ onClick?: (event: MouseEvent | KeyboardEvent) => void; /** * Disabled state. */ disabled?: boolean; /** * The `icon` prop determines the representation of an icon within the component. * It can be a string, such as a URL for an SVG image, or a React component for example <Icon> component. */ icon?: ReactNode; /** * This property controls the size of the icon, influencing the appearance of the component.<br> * Possible values: `'default' | 'compact'` */ appearance?: 'default' | 'compact'; /** * The prop determines the color of the icon in the component. * It should be a string representing a valid CSS color value. */ iconColor?: string; /** * Label for tag component. * Adding props you will add the `<Tag/>` component. */ tagName?: string; /** * Color value for tag component. */ tagColor?: string; /** * Props for `<Switcher/>` component (see `<Switcher/>` component documentation). * Adding props you wil add the component. */ switcherProps?: typeof Switcher.propTypes; /** * The main descriptive text or title for the component. */ title?: string; /** * Additional information or tooltip string that appears when hovering over the info icon next to the title. * If not provided, the info icon will not be displayed. */ titleInfo?: string; /** * Description paragraph. */ description?: string; /** * Icon background color for default appearance. */ iconBackground?: boolean; } declare const InteractiveWidget: FC<IInteractiveWidgetProps>; export { IInteractiveWidgetProps, InteractiveWidget as default };