Skip to content

Commit

Permalink
Docs(web-react): Import useState hook from React instead of namespa…
Browse files Browse the repository at this point in the history
…ce in Dropdown
  • Loading branch information
literat committed Jun 4, 2024
1 parent e473307 commit 195baec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/web-react/src/components/Dropdown/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ Enhance your DropdownPopover by incorporating the versatile [Item][item] compone
Explore additional examples and insights within the dedicated documentation for the [Item][item] component.

```jsx
const [isOpen, setIsOpen] = React.useState(false);
import { useState } from 'react';

const [isOpen, setIsOpen] = useState(false);
const onToggle = () => setIsOpen(!isOpen);

<Dropdown id="DropdownExample" isOpen={isOpen} onToggle={onToggle}>
Expand Down

0 comments on commit 195baec

Please sign in to comment.