Skip to content
This repository has been archived by the owner on Aug 14, 2019. It is now read-only.

Latest commit

 

History

History
56 lines (45 loc) · 1.25 KB

File metadata and controls

56 lines (45 loc) · 1.25 KB

Filters

FilterInput

Implementation of the 'FilterInput' component for displaying filter inputs in toolbar filters.

Usage

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' } }
      />
    )
  }
}

FilterDropdown

Implementation of the 'FilterDropdown' component for displaying filter dropdowns in toolbar filters.

Usage

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: '' }]}] }
      />
    )
  }
}