-
Notifications
You must be signed in to change notification settings - Fork 534
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ActionMenu.Overlay for ActionMenu v2 (#1675)
* steal props from overlay :D * Alternate implementation with context * add changelog
- Loading branch information
1 parent
9a9da55
commit 2380b66
Showing
10 changed files
with
516 additions
and
377 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,5 @@ | ||
--- | ||
'@primer/components': patch | ||
--- | ||
|
||
ActionMenu v2: Added `ActionMenu.Overlay` which accepts props to customize the Menu overlay. |
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,14 @@ | ||
/** This context can be used by components that compose ActionList inside a Menu */ | ||
|
||
import React from 'react' | ||
|
||
type ContextProps = { | ||
container?: string | ||
listRole?: string | ||
itemRole?: string | ||
// This can be any function, we don't know anything about the arguments | ||
// to be more specific here, this is as good as (...args: any[]) => unknown | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
afterSelect?: Function | ||
} | ||
export const ActionListContainerContext = React.createContext<ContextProps>({}) |
Oops, something went wrong.