Sha256: 5b801b858f99c8c46c2a5d152e1c49e97ef0686415d7fd795c4edb5aa96b58da
Contents?: true
Size: 1.58 KB
Versions: 4
Compression:
Stored size: 1.58 KB
Contents
import React from 'react' import { Button, Filter, Flex, Select, TextInput } from '../..' const SortingChangeCallback = (sortOptions) => { alert(JSON.stringify(sortOptions[0])) } const FilterPlacement = (props) => { const options = [ { value: 'USA' }, { value: 'Canada' }, { value: 'Brazil' }, { value: 'Philippines' }, { value: 'A galaxy far far away, like really far away...' }, ] return ( <> <Filter double minWidth="375px" onSortChange={SortingChangeCallback} placement={"right"} results={1} sortOptions={{ popularity: 'Popularity', // eslint-disable-next-line manager_title: 'Manager\'s Title', // eslint-disable-next-line manager_name: 'Manager\'s Name', }} sortValue={[{ name: 'popularity', dir: 'desc' }]} {...props} > <TextInput label="Example Text Field" placeholder="Enter Text" {...props} /> <Select blankSelection="Select One..." label="Example Collection Select" name="Collection Select" options={options} {...props} /> <Flex spacing="between" {...props} > <Button text="Apply" {...props} /> <Button text="Clear" variant="secondary" {...props} /> </Flex> </Filter> </> ) } export default FilterPlacement
Version data entries
4 entries across 4 versions & 1 rubygems