import * as React from 'react'; import { DefaultButton, Callout, Link, getTheme, FontWeights, mergeStyleSets, Text } from 'office-ui-fabric-react'; import { useBoolean, useId } from '@uifabric/react-hooks'; const theme = getTheme(); const styles = mergeStyleSets({ buttonArea: { verticalAlign: 'top', display: 'inline-block', textAlign: 'center', margin: '0 100px', minWidth: 130, height: 32, }, callout: { maxWidth: 300, }, header: { padding: '18px 24px 12px', }, title: [ theme.fonts.xLarge, { margin: 0, fontWeight: FontWeights.semilight, }, ], inner: { height: '100%', padding: '0 24px 20px', }, actions: { position: 'relative', marginTop: 20, width: '100%', whiteSpace: 'nowrap', }, subtext: [ theme.fonts.small, { margin: 0, fontWeight: FontWeights.semilight, }, ], link: [ theme.fonts.medium, { color: theme.palette.neutralPrimary, }, ], }); export const CalloutBasicExample: React.FunctionComponent = () => { const [isCalloutVisible, { toggle: toggleIsCalloutVisible }] = useBoolean(false); const labelId: string = useId('callout-label'); const descriptionId: string = useId('callout-description'); return ( <>
{isCalloutVisible && (
All of your favorite people
Message body is optional. If help documentation is available, consider adding a link to learn more at the bottom.
Go to microsoft
)} ); };