mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 20:21:07 +08:00
18 lines
483 B
JavaScript
18 lines
483 B
JavaScript
import React, { Fragment } from 'react';
|
|
import LinkTo from '@storybook/addon-links/react';
|
|
|
|
export default {
|
|
title: 'Addons/Links/Scroll position',
|
|
decorators: [
|
|
(storyFn) => (
|
|
<Fragment>
|
|
<div style={{ marginBottom: '100vh' }}>Scroll down to see the link</div>
|
|
{storyFn()}
|
|
</Fragment>
|
|
),
|
|
],
|
|
};
|
|
|
|
export const First = () => <LinkTo story="Second">Go to Second</LinkTo>;
|
|
export const Second = () => <LinkTo story="First">Go to First</LinkTo>;
|