Skip to content

Commit

Permalink
fix(ConfigMenu): Added ability to customise the title of the menu
Browse files Browse the repository at this point in the history
  • Loading branch information
HHogg committed Jan 16, 2024
1 parent f1632df commit 173839a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Binary file added preshape.sketch
Binary file not shown.
1 change: 0 additions & 1 deletion preshape.sketchpalette

This file was deleted.

3 changes: 2 additions & 1 deletion workspaces/package/src/ConfigMenu/ConfigMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ const __root = '__root';

export const ConfigMenu = ({
config,
title = 'Settings',
...rest
}: PropsWithChildren<ConfigMenuProps>) => {
const { themeOpposite } = useThemeContext();
Expand Down Expand Up @@ -196,7 +197,7 @@ export const ConfigMenu = ({
{...rest}
>
{activeKey === __root && (
<Menu title="Settings">
<Menu title={title}>
{config.map((entry, index) => {
if (isDivider(entry)) {
return <MenuItemDivider key={index} />;
Expand Down

0 comments on commit 173839a

Please sign in to comment.