-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: update context meu * fix: context menu placement
- Loading branch information
1 parent
88780af
commit 781a1c2
Showing
8 changed files
with
282 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@saas-ui/core': patch | ||
'@saas-ui/react': patch | ||
--- | ||
|
||
Added long press support to ContextMenu |
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
10 changes: 10 additions & 0 deletions
10
apps/website/src/pages/docs/components/overlay/context-menu/props.mdx
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,10 @@ | ||
--- | ||
id: context-menu | ||
scope: props | ||
--- | ||
|
||
## Props | ||
|
||
### ContextMenu Props | ||
|
||
<PropsTable of="ContextMenu" /> |
10 changes: 10 additions & 0 deletions
10
apps/website/src/pages/docs/components/overlay/context-menu/theming.mdx
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,10 @@ | ||
--- | ||
id: context-menu | ||
scope: theming | ||
--- | ||
|
||
## Theming | ||
|
||
The `ContextMenu` composes the `Menu` component. | ||
|
||
- [Menu theming documentation](https://chakra-ui.com/docs/components/menu/theming) |
50 changes: 50 additions & 0 deletions
50
apps/website/src/pages/docs/components/overlay/context-menu/usage.mdx
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 @@ | ||
--- | ||
id: context-menu | ||
title: Context Menu | ||
description: A list of options that appears when a user interacts right-clicking on a trigger element. | ||
--- | ||
|
||
<ComponentLinks | ||
github={{ package: 'saas-ui-core' }} | ||
npm={{ package: '@saas-ui/core' }} | ||
/> | ||
|
||
## Import | ||
|
||
```ts | ||
import { | ||
ContextMenu, | ||
ContextMenuTrigger, | ||
ContextMenuList, | ||
ContextMenuItem, | ||
} from '@saas-ui/react' | ||
``` | ||
|
||
## Usage | ||
|
||
```jsx inline=true | ||
import { Center } from '@chakra-ui/react' | ||
import { | ||
ContextMenu, | ||
ContextMenuTrigger, | ||
ContextMenuList, | ||
ContextMenuItem, | ||
} from '@saas-ui/react' | ||
|
||
export default function Page() { | ||
return ( | ||
<ContextMenu> | ||
<ContextMenuTrigger> | ||
<Center height="200px" borderWidth="1px"> | ||
Right click here | ||
</Center> | ||
</ContextMenuTrigger> | ||
<ContextMenuList> | ||
<ContextMenuItem>Edit</ContextMenuItem> | ||
<ContextMenuItem>Copy</ContextMenuItem> | ||
<ContextMenuItem>Delete</ContextMenuItem> | ||
</ContextMenuList> | ||
</ContextMenu> | ||
) | ||
} | ||
``` |
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
Oops, something went wrong.
781a1c2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
saas-ui-storybook – ./
saas-ui-storybook.vercel.app
saas-ui-storybook-saas-js.vercel.app
saas-ui-storybook-git-main-saas-js.vercel.app
storybook.saas-ui.dev