react-icons/hi#HiOutlineAcademicCap TypeScript Examples
The following examples show how to use
react-icons/hi#HiOutlineAcademicCap.
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: CitationButton.tsx From nextclade with MIT License | 5 votes |
export function CitationButton() {
const { t } = useTranslation()
const [showCitation, setShowCitation] = useState(false)
const toggleOpen = useCallback(() => setShowCitation((showCitation) => !showCitation), [])
const open = useCallback(() => setShowCitation(true), [])
const close = useCallback(() => setShowCitation(false), [])
const text = t('Citation')
const closeText = t('Close this window')
return (
<>
<ButtonCitationBase type="button" onClick={open} title={text}>
<HiOutlineAcademicCap className="mr-xl-2" />
<span className="d-none d-xl-inline">{text}</span>
</ButtonCitationBase>
<Modal centered isOpen={showCitation} toggle={toggleOpen} fade={false} size="lg">
<ModalHeader toggle={close} tag="div">
<h2 className="text-center">{text}</h2>
</ModalHeader>
<ModalBody>
<Citation />
</ModalBody>
<ModalFooter>
<Container fluid>
<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>
</>
)
}