import React from 'react'; import { Button, ButtonVariant, DataList, DataListAction, DataListCell, DataListItem, DataListItemCells, DataListItemRow, Toolbar, ToolbarItem, ToolbarContent, ToolbarToggleGroup, ToolbarGroup, Divider, Drawer, DrawerActions, DrawerCloseButton, DrawerContent, DrawerContentBody, DrawerHead, DrawerPanelBody, DrawerPanelContent, Flex, FlexItem, InputGroup, InputGroupItem, PageSection, PageSectionVariants, Progress, Stack, StackItem, Text, TextContent, TextInput, Title, Select, SelectOption, SelectOptionProps, MenuToggle } from '@breakaway/preact-core'; import DashboardWrapper from '@breakaway/preact-core/src/demos/examples/DashboardWrapper'; import CodeBranchIcon from '@patternfly/react-icons/dist/esm/icons/code-branch-icon'; import CodeIcon from '@patternfly/react-icons/dist/esm/icons/code-icon'; import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon'; import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/check-circle-icon'; import ExclamationTriangleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-triangle-icon'; import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon'; import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon'; import TimesCircleIcon from '@patternfly/react-icons/dist/esm/icons/times-circle-icon'; interface SelectOptionType extends Omit { label: string; } const statusOptions: SelectOptionType[] = [ { value: 'New', label: 'New' }, { value: 'Pending', label: 'Pending' }, { value: 'Running', label: 'Running' }, { value: 'Cancelled', label: 'Cancelled' } ]; const riskOptions: SelectOptionType[] = [ { value: 'Low', label: 'Low' }, { value: 'Medium', label: 'Medium' }, { value: 'High', label: 'High' } ]; export const PrimaryDetailInlineModifier: React.FunctionComponent = () => { const [isDrawerExpanded, setIsDrawerExpanded] = React.useState(false); const [drawerPanelBodyContent, setDrawerPanelBodyContent] = React.useState(''); const [inputValue, setInputValue] = React.useState(''); const [statusIsOpen, setStatusIsOpen] = React.useState(false); const [statusSelected, setStatusSelected] = React.useState('Status'); const [riskIsOpen, setRiskIsOpen] = React.useState(false); const [riskSelected, setRiskSelected] = React.useState('Risk'); const [selectedDataListItemId, setSelectedDataListItemId] = React.useState(''); const onStatusSelect = (_event: React.MouseEvent | undefined, value: string | number | undefined) => { setStatusSelected(value); setStatusIsOpen(false); }; const onRiskSelect = (_event: React.MouseEvent | undefined, value: string | number | undefined) => { setRiskSelected(value); setRiskIsOpen(false); }; const onSelectDataListItem = ( _event: React.MouseEvent | React.KeyboardEvent, id: string ) => { setSelectedDataListItemId(id); setIsDrawerExpanded(true); setDrawerPanelBodyContent(id.charAt(id.length - 1)); }; const onCloseDrawerClick = (_event: React.MouseEvent) => { setIsDrawerExpanded(false); setSelectedDataListItemId(''); }; const toggleGroupItems = ( , value: string) => setInputValue(value)} value={inputValue} /> ); const ToolbarItems = ( } breakpoint="xl"> {toggleGroupItems} ); const panelContent = ( node-{drawerPanelBodyContent}

The content of the drawer really is up to you. It could have form fields, definition lists, text lists, labels, charts, progress bars, etc. Spacing recommendation is 24px margins. You can put tabs in here, and can also make the drawer scrollable.

); const drawerContent = ( {ToolbarItems}

patternfly

Working repo for PatternFly 5 https://pf5.patternfly.org/
10 4 5 Updated 2 days ago
, ]} />

patternfly-elements

PatternFly elements
10 4 5 7 5 5 Updated 2 days ago
, ]} />

patternfly

Working repo for PatternFly 5 https://pf5.patternfly.org/
10 4 5 Updated 2 days ago
, ]} />

patternfly-elements

PatternFly elements
10 4 5 7 5 5 Updated 2 days ago
, ]} />
); return ( Main title Body text should be Overpass Regular at 16px. It should have leading of 24px because
of it's relative line height of 1.5.
{drawerContent}
); };