Skip to content

Commit

Permalink
docs: ⏪ Revert custom Link in Storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
mimarz committed Aug 31, 2023
1 parent fef99dc commit 2991136
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,20 @@ const preview: Preview = {
style={{ maxWidth: '70ch' }}
></Paragraph>
),
a: ({ href, ...rest }: LinkProps) => (
<Link
{...rest}
href={href?.startsWith('/') ? `/?path=${href}` : href}
/>
),
// a: ({ href, ...rest }: LinkProps) => {
// const { pathname = '', origin = '' } = document?.location;

// return (
// <Link
// {...rest}
// href={
// href?.startsWith('/')
// ? `${origin}${pathname}/?path=${href}`
// : href
// }
// />
// );
// },
h1: getHeading({ level: 1, size: 'xlarge' }),
h2: getHeading({ level: 2, size: 'large' }),
h3: getHeading({ level: 3, size: 'medium' }),
Expand Down

0 comments on commit 2991136

Please sign in to comment.