react-icons/bs#BsFlagFill TypeScript Examples
The following examples show how to use
react-icons/bs#BsFlagFill.
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: Links.tsx From hub with Apache License 2.0 | 6 votes |
ICONS: IconTypeList = {
homepage: TiHome,
source: FaCode,
source_github: FaGithub,
source_gitlab: SiGitlab,
source_gitea: SiGitea,
source_bitbucket: SiBitbucket,
support: BsFlagFill,
default: FaLink,
}
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>
);
}