-
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): Showcase Dropdown enhanced shadow Feature flag #DS-963
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
packages/web-react/src/components/Dropdown/demo/DropdownEnhancedShadow.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,24 @@ | ||
import React, { Ref } from 'react'; | ||
import { DropdownRenderProps } from '../../../types'; | ||
import { Button } from '../../Button'; | ||
import { Dropdown } from '..'; | ||
import DropdownContentFactory from './DropdownContentFactory'; | ||
import { dropdownContent } from './constants'; | ||
|
||
const DropdownEnhancedShadow = () => { | ||
const dropdownTrigger = ({ trigger: { className, ref, ...restOf } }: DropdownRenderProps) => ( | ||
<Button UNSAFE_className={className} ref={ref as Ref<HTMLButtonElement>} {...restOf}> | ||
Finibus quis imperdiet, semper imperdiet aliquam | ||
</Button> | ||
); | ||
|
||
return ( | ||
<div className="spirit-feature-dropdown-enable-enhanced-shadow"> | ||
<Dropdown renderTrigger={dropdownTrigger} placement="top-left"> | ||
<DropdownContentFactory content={dropdownContent} /> | ||
</Dropdown> | ||
</div> | ||
); | ||
}; | ||
|
||
export default DropdownEnhancedShadow; |
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