Skip to content

Commit

Permalink
feat: remove focus visible
Browse files Browse the repository at this point in the history
  • Loading branch information
sravichandran-eightfold committed Nov 11, 2024
1 parent 0e1730e commit 549743a
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 55 deletions.
101 changes: 52 additions & 49 deletions src/components/Menu/Menu.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { IconName } from '../Icon';
import { useCanvasDirection } from '../../hooks/useCanvasDirection';
import { SelectorSize } from '../CheckBox';
import { CascadingMenu } from './CascadingMenu';
import { ConfigProvider } from '../ConfigProvider';

export default {
title: 'Menu',
Expand Down Expand Up @@ -58,61 +59,63 @@ export default {
} as ComponentMeta<typeof Menu>;

const BasicOverlay = (args: any) => (
<Menu
{...args}
items={[
{
iconProps: {
path: IconName.mdiCalendar,
},
text: 'Date',
value: 'menu 1',
counter: '8',
secondaryButtonProps: {
<ConfigProvider themeOptions={{ name: 'blue' }}>
<Menu
{...args}
items={[
{
iconProps: {
path: IconName.mdiTrashCan,
path: IconName.mdiCalendar,
},
onClick: () => {
console.log('Delete clicked');
text: 'Date',
value: 'menu 1',
counter: '8',
secondaryButtonProps: {
iconProps: {
path: IconName.mdiTrashCan,
},
onClick: () => {
console.log('Delete clicked');
},
},
},
},
{
text: 'Disabled button',
value: 'menu 2',
disabled: true,
subText: 'This is a sub text',
},
{
iconProps: {
path: IconName.mdiCalendar,
{
text: 'Disabled button',
value: 'menu 2',
disabled: true,
subText: 'This is a sub text',
},
text: 'Date',
value: 'menu 3',
counter: '8',
},
{
text: 'Button',
value: 'menu 4',
},
{
iconProps: {
path: IconName.mdiCalendar,
{
iconProps: {
path: IconName.mdiCalendar,
},
text: 'Date',
value: 'menu 3',
counter: '8',
},
text: 'Date',
value: 'menu 5',
counter: '8',
},
{
text: 'Button',
value: 'menu 6',
},
]}
onChange={(item) => {
args.onChange(item);
console.log(item);
}}
/>
{
text: 'Button',
value: 'menu 4',
},
{
iconProps: {
path: IconName.mdiCalendar,
},
text: 'Date',
value: 'menu 5',
counter: '8',
},
{
text: 'Button',
value: 'menu 6',
},
]}
onChange={(item) => {
args.onChange(item);
console.log(item);
}}
/>
</ConfigProvider>
);

const LinkOverlay = (args: any) => (
Expand Down
6 changes: 0 additions & 6 deletions src/components/Menu/MenuItem/menuItem.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@
margin: $space-xxs 0;
white-space: nowrap;

&:focus-within {
box-shadow: var(--focus-visible-box-shadow);
color: var(--primary-color);
border-radius: var(--border-radius-xl);
}

&.wrap {
white-space: normal;
overflow-wrap: anywhere;
Expand Down

0 comments on commit 549743a

Please sign in to comment.