mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 21:51:17 +08:00
26 lines
544 B
JavaScript
26 lines
544 B
JavaScript
import { document } from 'global';
|
|
import React from 'react';
|
|
|
|
export default {
|
|
title: 'Addons/QueryParams',
|
|
|
|
parameters: {
|
|
query: {
|
|
mock: true,
|
|
},
|
|
},
|
|
};
|
|
|
|
export const MockIsTrue = () => (
|
|
<div>This story should have an extra url query param: {document.location.search}</div>
|
|
);
|
|
|
|
MockIsTrue.storyName = 'mock is true';
|
|
|
|
export const MockIs4 = () => (
|
|
<div>This story should have an extra url query param: {document.location.search}</div>
|
|
);
|
|
|
|
MockIs4.storyName = 'mock is 4';
|
|
MockIs4.parameters = { query: { mock: 4 } };
|