import { useState, FunctionComponent, MouseEvent, Ref, CSSProperties } from 'react'; import FileDetailsLabel from '@patternfly/chatbot/dist/dynamic/FileDetailsLabel'; import { Stack, MenuToggle, MenuToggleElement, Select, SelectList, SelectOption } from '@patternfly/react-core'; export const FileDetailsLabelExample: FunctionComponent = () => { const [variant, setVariant] = useState('plain'); const [isOpen, setIsOpen] = useState(false); const [selected, setSelected] = useState('Variant'); const onSelect = (_event: MouseEvent | undefined, value: string | number | undefined) => { setVariant(value as string); setSelected(value as string); setIsOpen(false); }; const onToggleClick = () => { setIsOpen(!isOpen); }; const toggle = (toggleRef: Ref) => ( {selected} ); return (
console.log('clicked close button!') })} // eslint-disable-next-line no-console {...(variant === 'Clickable' && { onClick: () => console.log('clicked entire button!') })} {...(variant === 'Loading' && { isLoading: true })} />
); };