react-icons/fa#FaListUl TypeScript Examples
The following examples show how to use
react-icons/fa#FaListUl.
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: App.tsx From clarity with Apache License 2.0 | 5 votes |
SideMenuItems: (MenuItem | GroupedMenuItem)[] = [
new MenuItem(
Pages.Accounts,
'Accounts',
<IoMdKey fontSize={SideMenuIconSize} />
),
new MenuItem(
Pages.Faucet,
'Faucet',
<IoIosWater fontSize={SideMenuIconSize} />,
false,
FaucetAsterix
),
new MenuItem(
Pages.DeployContracts,
'Deploy Contract',
<IoMdRocket fontSize={SideMenuIconSize} />
),
// new MenuItem(
// Pages.Explorer,
// 'Explorer',
// <FaMapMarkedAlt fontSize={SideMenuIconSize} />
// ),
new MenuItem(Pages.Blocks, 'Blocks', <FiGrid fontSize={SideMenuIconSize} />),
new MenuItem(
Pages.Deploys,
'Deploys',
<FaListUl fontSize={SideMenuIconSize} />
),
new MenuItem(
Pages.Search,
'Search',
<FaSearch fontSize={SideMenuIconSize} />
),
new MenuItem(
Pages.Validators,
'Validators',
<FaUsers fontSize={SideMenuIconSize} />
),
new MenuItem(
Pages.ConnectedPeers,
'Connected Peers',
<FaNetworkWired fontSize={SideMenuIconSize} />
)
// new GroupedMenuItem(
// 'clarityContracts',
// 'Contracts',
// <FaFileContract fontSize={SideMenuIconSize} />,
// [new MenuItem(Pages.Vesting, 'Vesting')]
// )
]
Example #2
Source File: TOC.tsx From hub with Apache License 2.0 | 5 votes |
TOC = (props: Props) => {
const dropdownRef = useRef(null);
const buttonRef = useRef(null);
const [visibleTOC, setVisibleTOC] = useState<boolean>(false);
useOutsideClick([dropdownRef, buttonRef], visibleTOC, () => {
setVisibleTOC(false);
});
if (props.toc.length === 0) return null;
return (
<div className={`position-relative ${styles.toc}`}>
<div className={`d-flex flex-row align-items-top ${styles.titleWrapper}`}>
<div className="mt-0 mt-sm-2">
<button
ref={buttonRef}
className={`btn btn-sm me-2 btn-outline-dark ${styles.btn}`}
onClick={() => setVisibleTOC(!visibleTOC)}
aria-label="Table of contents"
aria-expanded={visibleTOC}
aria-pressed={visibleTOC}
aria-owns="TOC-list"
aria-controls="TOC-list"
>
<FaListUl className={`position-relative ${styles.icon}`} />
</button>
</div>
<div className={`flex-grow-1 ${styles.minWidth}`}>
<h1 className={`mb-0 lh-base ${styles.title}`}>
<ReactMarkdown children={cleanTOCEntry(props.title)} linkTarget="_blank" skipHtml />
</h1>
</div>
{props.supportLink && (
<div className={`ms-2 ${styles.supportLinkWrapper}`}>
<ExternalLink href={props.supportLink} className="me-0" label="Open support link">
<small className="d-flex flex-row align-items-center text-nowrap text-primary">
<BsFlagFill className="me-1" />
Report issue
</small>
</ExternalLink>
</div>
)}
</div>
{visibleTOC && (
<div
ref={dropdownRef}
id="TOC-list"
className={`dropdown-menu dropdown-menu-left shadow-sm noFocus show p-0 ${styles.dropdown}`}
tabIndex={0}
role="listbox"
aria-roledescription="Table of content links"
>
<div className={`overflow-auto py-3 visible-scroll ${styles.list}`}>
<TOCList {...props} setVisibleTOC={setVisibleTOC} />
</div>
</div>
)}
</div>
);
}
Example #3
Source File: App.tsx From casper-clarity with Apache License 2.0 | 5 votes |
SideMenuItems: (MenuItem | GroupedMenuItem)[] = [
new MenuItem(
Pages.Accounts,
'Accounts',
<IoMdKey fontSize={SideMenuIconSize} />
),
faucetMenuItem,
new MenuItem(
Pages.DeployContracts,
'Deploy Contract',
<IoMdRocket fontSize={SideMenuIconSize} />
),
// new MenuItem(
// Pages.Explorer,
// 'Explorer',
// <FaMapMarkedAlt fontSize={SideMenuIconSize} />
// ),
new MenuItem(Pages.Blocks, 'Blocks', <FiGrid fontSize={SideMenuIconSize} />),
new MenuItem(
Pages.Deploys,
'Deploys',
<FaListUl fontSize={SideMenuIconSize} />
),
new MenuItem(
Pages.Search,
'Search',
<FaSearch fontSize={SideMenuIconSize} />
),
new MenuItem(
Pages.Validators,
'Validators',
<FaUsers fontSize={SideMenuIconSize} />
),
new MenuItem(
Pages.ConnectedPeers,
'Connected Peers',
<FaNetworkWired fontSize={SideMenuIconSize} />
)
// new GroupedMenuItem(
// 'clarityContracts',
// 'Contracts',
// <FaFileContract fontSize={SideMenuIconSize} />,
// [new MenuItem(Pages.Vesting, 'Vesting')]
// )
]
Example #4
Source File: WhatsNewButton.tsx From nextclade with MIT License | 5 votes |
export function WhatsNewButton() {
const { t } = useTranslation()
const [showChangelog, setShowChangelog] = useRecoilState(changelogIsShownAtom)
const [showChangelogOnUpdate, setShowChangelogOnUpdate] = useRecoilState(changelogShouldShowOnUpdatesAtom)
const toggleOpen = useCallback(() => {
setShowChangelog((showChangelog) => !showChangelog)
}, [setShowChangelog])
const open = useCallback(() => {
setShowChangelog(true)
}, [setShowChangelog])
const close = useCallback(() => {
setShowChangelog(false)
}, [setShowChangelog])
const text = t("What's new")
const closeText = t('Close this window')
return (
<>
<ButtonWhatsNewBase type="button" onClick={open} title={text}>
<FaListUl className="mr-xl-2" />
<span className="d-none d-xl-inline">{text}</span>
</ButtonWhatsNewBase>
<Modal centered isOpen={showChangelog} toggle={toggleOpen} fade={false} size="lg">
<ModalHeader toggle={close} tag="div">
<H1 className="text-center">{text}</H1>
</ModalHeader>
<ModalBody>
<MDXProvider components={components}>
<Changelog />
</MDXProvider>
</ModalBody>
<ModalFooter>
<Container fluid>
<Row noGutters className="my-2">
<Col className="d-flex w-100">
<div className="ml-auto">
<Toggle
className="m-0"
identifier={'show-whatsnew-again-toggle'}
checked={showChangelogOnUpdate}
onCheckedChanged={setShowChangelogOnUpdate}
>
{t('Show when a new version is available')}
</Toggle>
</div>
</Col>
</Row>
<Row noGutters className="my-2">
<Col className="d-flex w-100">
<ButtonOk className="ml-auto" type="button" color="success" onClick={close} title={closeText}>
{t('OK')}
</ButtonOk>
</Col>
</Row>
</Container>
</ModalFooter>
</Modal>
</>
)
}