-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs(web-react): Add the missing demo of
DropdownModern
with enhanc…
…ed shadow
- Loading branch information
1 parent
deb054c
commit 4430fbb
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
packages/web-react/src/components/DropdownModern/demo/DropdownModernEnhancedShadow.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React from 'react'; | ||
import DropdownModern from '../../Dropdown/DropdownModern'; | ||
import DropdownTrigger from '../../Dropdown/DropdownTrigger'; | ||
import DropdownPopover from '../../Dropdown/DropdownPopover'; | ||
import { Button } from '../../Button'; | ||
import { dropdownContent } from './constants'; | ||
import DropdownContentFactory from './DropdownContentFactory'; | ||
|
||
const DropdownModernEnhancedShadow = () => { | ||
const [isOpen, setIsOpen] = React.useState(false); | ||
const onToggle = () => setIsOpen(!isOpen); | ||
|
||
return ( | ||
<div className="spirit-feature-dropdown-enable-enhanced-shadow"> | ||
<DropdownModern id="DropdownModernEnhancedShadow" isOpen={isOpen} onToggle={onToggle} placement="top-left"> | ||
<DropdownTrigger elementType={Button}>Finibus quis imperdiet, semper imperdiet aliquam</DropdownTrigger> | ||
<DropdownPopover> | ||
<DropdownContentFactory content={dropdownContent} /> | ||
</DropdownPopover> | ||
</DropdownModern> | ||
</div> | ||
); | ||
}; | ||
|
||
export default DropdownModernEnhancedShadow; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters