Skip to content

Commit

Permalink
fix(Link): remove type omission and add TODO item
Browse files Browse the repository at this point in the history
- also add in the nested V2 folder in storybook, and export
  • Loading branch information
booc0mtaco committed Mar 19, 2024
1 parent d7c67a7 commit fb56ee0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/components/Link/Link-v2.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
import { Link, type LinkProps } from './Link-v2';

export default {
title: 'Components/Link (v2)',
title: 'Components/V2/Link',
component: Link,
parameters: {
badges: ['intro-1.0', 'current-2.0'],
Expand Down
8 changes: 2 additions & 6 deletions src/components/Link/Link-v2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,11 @@ import Icon from '../Icon';

import styles from './Link-v2.module.css';

type LinkHTMLElementProps = Omit<
React.AnchorHTMLAttributes<HTMLAnchorElement>,
'disabled'
>;

export type LinkProps = LinkHTMLElementProps & {
export type LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & {
// Component API
/**
* Component used to render the element. Meant to support interaction with framework navigation libraries.
* TODO-AH: support frameworks that may not use (or replace) `href` for some other prop
*
* **Default is `"a"`**.
*/
Expand Down
1 change: 1 addition & 0 deletions src/components/Link/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export { Link as default } from './Link';
export type { LinkProps } from './Link';
export { Link as LinkV2 } from './Link-v2';

0 comments on commit fb56ee0

Please sign in to comment.