@massds/mayflower-react
Version:
React versions of Mayflower design system UI components
56 lines (55 loc) • 1.58 kB
TypeScript
/**
* FilterBox module.
* @module @massds/mayflower-react/FilterBox
* @requires module:@massds/mayflower-assets/scss/01-atoms/forms
* @requires module:@massds/mayflower-assets/scss/01-atoms/buttons
*/
import React from 'react';
import { ButtonProps } from '../Button';
export interface FilterBoxProps {
/** The id of the FilterBox component. */
id?: string;
/** Apply active state */
active?: boolean;
/** The form action */
action?: string;
/** The aria-label for the filter form element */
filterLabel?: string;
/** An additional note for the SR users describing the functionality of the filter */
filterNote?: string;
/** @forms/Button */
submitButton?: ButtonProps;
/** Clear all button at the bottom of the filter */
clearButton?: {
text?: string;
info?: string;
onClearCallback?(...args: unknown[]): unknown;
};
/** Controls if we allow filterbox to render only on mobile */
filterDesktopHidden?: boolean;
/** An array of filter fields */
fields?: {
class?: string;
component?: React.ReactElement;
}[];
}
declare const FilterBox: {
(props: FilterBoxProps): any;
defaultProps: {
id: string;
active: boolean;
clearButton: {
text: string;
info: string;
};
submitButton: {
text: string;
type: string;
size: string;
theme: string;
usage: string;
};
action: string;
};
};
export default FilterBox;