DrawerContent
Component
Represents the KendoReact Drawer component.
Definition
Package:@progress/kendo-react-layout
Properties Interface:DrawerContentProps
Syntax:
jsx
const App = () => {
const items = [
{ text: 'Inbox', icon: 'k-i-inbox', selected: true },
{ separator: true },
{ text: 'Notifications', icon: 'k-i-bell', disabled: true },
{ text: 'Calendar', icon: 'k-i-calendar' },
{ separator: true },
{ text: 'Attachments', icon: 'k-i-hyperlink-email' },
{ text: 'Favourites', icon: 'k-i-star' }
];
const [expanded, setExpanded] = React.useState(true);
const handleClick = () => setExpanded(prevState => !prevState);
return (
<Drawer expanded={expanded} position='start' mode='push' items={items}>
<DrawerContent>
<Button onClick={handleClick}>Toggle the drawer state</Button>
</DrawerContent>
</Drawer>
);
};
Properties
children?
any
Sets the DrawerContent items declaratively.
className?
string
Specifies a list of CSS classes that will be added to the DrawerContent element.
style?
CSSProperties
Sets additional CSS styles to the DrawerContent.
References
The DrawerContent ref.