UNPKG

@massds/mayflower-react

Version:

React versions of Mayflower design system UI components

35 lines (34 loc) 1.27 kB
/** * Tags module. * @module @massds/mayflower-react/Tags * @requires module:@massds/mayflower-assets/scss/02-molecules/tags * @requires module:@massds/mayflower-assets/scss/01-atoms/button-tag */ import React from 'react'; export interface TagsProps { /** The tags applied to the search list <br/> type: The type of tag <br /> text: The content displayed by the tag (required) <br /> description: The visually hidden description of the tag <br /> value: The value of the tag */ tags?: { type?: string; text: React.ReactNode; description?: React.ReactNode; value?: string; }[]; /** Custom onClick function that triggers when 'Clear all' button is clicked */ onClearCallback?(...args: unknown[]): unknown; /** Custom onClick function that triggers when a tag is clicked */ onClearThisCallback?(...args: unknown[]): unknown; /** Clear all button context for screen readers. */ clearAllContext?: string; } declare class Tags extends React.Component<TagsProps> { constructor(props: any); UNSAFE_componentWillReceiveProps(nextProps: any): void; handleClearAll(): void; handleClearThis(event: any): void; render(): any; } export default Tags;