@engie-group/fluid-design-system-react
Version:
Fluid Design System React
26 lines (25 loc) • 889 B
TypeScript
import type { TagProperties } from '@engie-group/fluid-types';
import React, { ComponentPropsWithoutRef } from 'react';
import { ActionAsChild } from '../../utils/typeHelpers';
export declare const NJTag: React.ForwardRefExoticComponent<NJTagProps & React.RefAttributes<HTMLDivElement>>;
type NJTagOwnProps = TagProperties & ComponentPropsWithoutRef<'span'> & {
/**
* Tag label
*/
label: string;
/**
* Label for the close button, if present
* @example "Remove [tag name]"
*/
closeAriaLabel?: string;
/**
* Event when the tag is closed. Focus must be set to either previous tag, next tag or any relevant element.
*/
onClose?: React.MouseEventHandler<HTMLElement>;
/**
* Whether the tag is visible or not
*/
isVisible?: boolean;
};
export type NJTagProps = NJTagOwnProps & ActionAsChild<NJTagOwnProps>;
export {};