Skip to content

Commit

Permalink
docs: adjust styling of menu (#3184)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebald authored Jul 24, 2023
1 parent b8de28a commit e4fa806
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
9 changes: 5 additions & 4 deletions docs/app/_components/ThemeMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ export const ThemeMenu = () => {

return (
<Menu.Trigger>
<Button>
{current ? current : themes.b2b.name} theme
<ChevronDown />
<Button variant="ghost" size="small">
<strong>Current Theme:</strong>
<span className="uppercase">{current ? current : themes.b2b.name}</span>
<ChevronDown className="h-4 w-4" />
</Button>
<Menu onAction={current => setTheme(current)}>
{Object.keys(themes).map(name => (
<Menu.Item key={name}>{name}</Menu.Item>
<Menu.Item key={name}>{name.toUpperCase()}</Menu.Item>
))}
</Menu>
</Menu.Trigger>
Expand Down
3 changes: 3 additions & 0 deletions docs/theme/components/Button.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ export const Button: ThemeComponent<'Button'> = cva(
ghost:
'text-secondary-700 hover:text-secondary-900 border-transparent p-0',
},
size: {
small: 'text-sm',
},
},
}
);
4 changes: 2 additions & 2 deletions docs/theme/components/Menu.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { ThemeComponent, cva } from '@marigold/system';

export const Menu: ThemeComponent<'Menu'> = {
container: cva([
'overflow-y-auto overflow-x-hidden rounded-sm border border-solid bg-white ',
'border-border bg-bg-surface overflow-hidden rounded-md border px-1 py-1.5 text-sm shadow-md',
'sm:max-h-[45vh] md:max-h-[75vh] lg:max-h-[75vh]',
]),
item: cva('hover:bg-bg-hover cursor-pointer px-2 py-1 outline-none'),
item: cva('hover:bg-bg-hover cursor-pointer p-2 outline-none'),
section: cva(''),
};
2 changes: 1 addition & 1 deletion docs/theme/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ export const colors = {
// Border
// ---------------
border: {
DEFAULT: tw.slate[900],
DEFAULT: tw.slate[300],
},
};

2 comments on commit e4fa806

@vercel
Copy link

@vercel vercel bot commented on e4fa806 Jul 24, 2023

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:

marigold-storybook – ./

marigold-storybook-marigold.vercel.app
marigold-storybook-git-main-marigold.vercel.app
marigold-latest.vercel.app

@vercel
Copy link

@vercel vercel bot commented on e4fa806 Jul 24, 2023

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:

marigold-docs – ./

marigold-docs-marigold.vercel.app
marigold-docs.vercel.app
marigold-docs-git-main-marigold.vercel.app

Please sign in to comment.