-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add autoPositionDisable prop [MDS-839]
- Loading branch information
Showing
7 changed files
with
6,775 additions
and
221 deletions.
There are no files selected for viewing
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
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,50 @@ | ||
import React from 'react'; | ||
import { Popover, Button, MenuItem } from '@heathmont/moon-core-tw'; | ||
import { OtherFrame } from '@heathmont/moon-icons-tw'; | ||
|
||
const Example = () => { | ||
return ( | ||
<Popover autoPositionDisable={true}> | ||
<Popover.Trigger> | ||
<Button>Toggle Popover</Button> | ||
</Popover.Trigger> | ||
<Popover.Panel className="p-2 flex flex-col gap-1"> | ||
<Content /> | ||
</Popover.Panel> | ||
</Popover> | ||
); | ||
}; | ||
|
||
const Content: React.FC = () => ( | ||
<> | ||
<MenuItem> | ||
<span className="flex w-11 h-11 bg-gohan items-center justify-center rounded-lg"> | ||
<OtherFrame className="text-bulma text-moon-24" /> | ||
</span> | ||
<MenuItem.MultiTitle | ||
title="Tournaments" | ||
text={<span>Best tournaments with streamers</span>} | ||
/> | ||
</MenuItem> | ||
<MenuItem> | ||
<span className="flex w-11 h-11 bg-gohan items-center justify-center"> | ||
<OtherFrame className="text-bulma text-moon-24" /> | ||
</span> | ||
<MenuItem.MultiTitle | ||
title="Promotions" | ||
text={<span> Your favourite games</span>} | ||
/> | ||
</MenuItem> | ||
<MenuItem> | ||
<span className="flex w-11 h-11 bg-gohan items-center justify-center"> | ||
<OtherFrame className="text-bulma text-moon-24" /> | ||
</span> | ||
<MenuItem.MultiTitle | ||
title="Providers" | ||
text={<span> Your favourite games</span>} | ||
/> | ||
</MenuItem> | ||
</> | ||
); | ||
|
||
export default Example; |
Oops, something went wrong.