Skip to content

Commit

Permalink
Fix MenuItem typing
Browse files Browse the repository at this point in the history
  • Loading branch information
ericgio committed Jul 6, 2022
1 parent c6c62de commit 53689b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 1 addition & 4 deletions src/components/MenuItem/BaseMenuItem.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ export default {
component: BaseMenuItem,
} as Meta;

const Template: Story<BaseMenuItemProps> = (args) => (
// @ts-ignore
<BaseMenuItem {...args} />
);
const Template: Story<BaseMenuItemProps> = (args) => <BaseMenuItem {...args} />;

export const Default = Template.bind({});
Default.args = {
Expand Down
5 changes: 3 additions & 2 deletions src/components/MenuItem/MenuItem.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import cx from 'classnames';
import React, { forwardRef, HTMLProps, MouseEvent } from 'react';
import React, { forwardRef, HTMLAttributes, MouseEvent } from 'react';

import { useItem, UseItemProps } from '../../behaviors/item';

export interface BaseMenuItemProps extends HTMLProps<HTMLAnchorElement> {
export interface BaseMenuItemProps extends HTMLAttributes<HTMLAnchorElement> {
active?: boolean;
disabled?: boolean;
href?: string;
}

export const BaseMenuItem = forwardRef<HTMLAnchorElement, BaseMenuItemProps>(
Expand Down

0 comments on commit 53689b6

Please sign in to comment.