react-feather#ChevronsUp TypeScript Examples
The following examples show how to use
react-feather#ChevronsUp.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Order.tsx From ke with MIT License | 6 votes |
export function Order({ value, onChange }: OrderProps): ReactElement<OrderProps> {
switch (value) {
case 'asc':
return (
<IconButton
background={{}}
aria-label="По возрастанию"
icon={<ChevronsDown />}
onClick={() => onChange('desc')}
size="xs"
/>
)
case 'desc':
return (
<IconButton
background={{}}
aria-label="По убыванию"
icon={<ChevronsUp />}
onClick={() => onChange(null)}
size="xs"
/>
)
case null:
return (
<IconButton
background={{}}
aria-label="Сортировать"
icon={<Minus />}
onClick={() => onChange('asc')}
size="xs"
/>
)
default:
throw new TypeError(`Unknown order direction: ${value}. Awaiting for 'asc' | 'desc' | null`)
}
}
Example #2
Source File: SortDirection.tsx From ke with MIT License | 6 votes |
export function SortDirection({ value, onChange }: OrderProps): JSX.Element {
switch (value) {
case 'asc':
return (
<IconButton
background={{}}
aria-label="По возрастанию"
icon={<ChevronsDown />}
onClick={() => onChange('desc')}
size="xs"
/>
)
case 'desc':
return (
<IconButton
background={{}}
aria-label="По убыванию"
icon={<ChevronsUp />}
onClick={() => onChange(null)}
size="xs"
/>
)
case null:
return (
<IconButton
background={{}}
aria-label="Сортировать"
icon={<Minus />}
onClick={() => onChange('asc')}
size="xs"
/>
)
default:
throw new TypeError(`Unknown sort direction: ${value}. Awaiting for 'asc' | 'desc' | null`)
}
}
Example #3
Source File: SortHandler.tsx From ke with MIT License | 6 votes |
function SortDirection({ value, onChange }: SortDirectionProps): JSX.Element {
switch (value) {
case 'asc':
return (
<IconButton
background={{}}
aria-label="По возрастанию"
icon={<ChevronsDown />}
onClick={() => onChange('desc')}
size="xs"
/>
)
case 'desc':
return (
<IconButton
background={{}}
aria-label="По убыванию"
icon={<ChevronsUp />}
onClick={() => onChange(null)}
size="xs"
/>
)
case null:
return (
<IconButton
background={{}}
aria-label="Сортировать"
icon={<Minus />}
onClick={() => onChange('asc')}
size="xs"
/>
)
default:
throw new TypeError(`Unknown sort direction: ${value}. Awaiting for 'asc' | 'desc' | null`)
}
}