Implementation of the 'FilterInput' component for displaying filter inputs in toolbar filters.
Import FilterInput from this package. The type
of input can be radio
or checkbox
.
import React from 'react';
import { FilterInput } from '@redhat-insights/insights-frontent-components/';
class YourCmp extends React.Component {
render() {
return (
<FilterInput
aria-label="label"
id="id"
label="label"
addRemoveFilters={ jest.fn() }
param="param"
type="radio"
value="value"
filters={ { param: 'value' } }
/>
)
}
}
Implementation of the 'FilterDropdown' component for displaying filter dropdowns in toolbar filters.
Import FilterDropdown from this package.
import React from 'react';
import { FilterInput } from '@redhat-insights/insights-frontent-components/';
class YourCmp extends React.Component {
render() {
return (
<FilterDropdown
filters={ {} }
addFilter={ jest.fn() }
removeFilter={ jest.fn() }
filterCategories={ [{ title: '', type: '', urlParam: '', values: [{ label: '', value: '' }]}] }
/>
)
}
}