react-icons/fa#FaChevronDown TypeScript Examples
The following examples show how to use
react-icons/fa#FaChevronDown.
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: CollapsibleText.tsx From 3Speak-app with GNU General Public License v3.0 | 6 votes |
export function CollapsibleText(props: any) {
const [collapsed, setCollapsed] = useState(true)
const handleClick = (e) => {
setCollapsed(!collapsed)
}
return (
<>
<div
style={{
maxHeight: collapsed ? '200px' : 'initial',
overflow: 'hidden',
}}
>
{props.children}
</div>
<div
className="text-center"
onClick={handleClick}
id="videoAboutCollapse"
style={{ cursor: 'pointer', borderTop: '1px solid rgba(0,0,0,0.2)' }}
>
{collapsed ? <FaChevronDown /> : <FaChevronUp />}
{collapsed ? 'Show more' : 'Show less'}
</div>
</>
)
}
Example #2
Source File: CollapsableDialog.tsx From iplocate with MIT License | 6 votes |
CollapsableDialog: React.FC<Props> = (props) => {
const { title, menuExpanded, setMenuExpanded, children } = props;
return (
<Wrapper {...props}>
<Card>
<ExpandHeader
aria-label="toggle menu expanded"
onClick={() => setMenuExpanded(!menuExpanded)}
>
<CardHeader>{title}</CardHeader>
<ExpandIcon>
{menuExpanded ? <FaChevronUp /> : <FaChevronDown />}
</ExpandIcon>
</ExpandHeader>
{menuExpanded && <Collapse>{children}</Collapse>}
</Card>
</Wrapper>
);
}
Example #3
Source File: TableHead.tsx From crossfeed with Creative Commons Zero v1.0 Universal | 5 votes |
TableHead = <T extends object>({ headerGroups }: PropsWithChildren<TableHeadProps<T>>) => ( <thead> {headerGroups.map((headerGroup) => { const { key, ...rest } = headerGroup.getHeaderGroupProps(); return ( <React.Fragment key={key}> <tr {...rest}> {headerGroup.headers.map((column, index) => { const { key, ...rest } = column.getHeaderProps(); return ( <th {...rest} key={key} className={classes.th}> <div className="display-flex flex-justify flex-align-center flex-no-wrap text-no-wrap" {...column.getSortByToggleProps()} > {column.render('Header')} {column.canSort && ( <div className="margin-left-05" style={{ visibility: column.isSorted ? 'visible' : 'hidden' }} > {column.isSortedDesc ? ( <FaChevronDown /> ) : ( <FaChevronUp /> )} </div> )} </div> </th> ); })} </tr> {headerGroup.headers.find((column) => column.canFilter) && ( <tr {...rest}> {headerGroup.headers.map((column) => { const { key, ...rest } = column.getHeaderProps(); return ( <th {...rest} key={key} className={classes.thFilter}> <div> {column.canFilter ? column.render('Filter') : null} </div> </th> ); })} </tr> )} </React.Fragment> ); })} </thead> )