-
Notifications
You must be signed in to change notification settings - Fork 0
/
preview.js
29 lines (26 loc) · 872 Bytes
/
preview.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import '../src/styles.scss';
import React from 'react';
import { MemoryRouter } from 'react-router-dom';
import { rootParameters } from '../../.storybook/preview';
export const parameters = {
...rootParameters,
};
export const decorators = [
(Story, context) => {
return (
<MemoryRouter initialEntries={['/']}>
<div className="bg-white text-slate-500 dark:bg-slate-900 dark:text-slate-400">
{context.title.startsWith('Project Graph') ? (
<div className="flex justify-center">
<div className="relative flex h-full w-72 flex-col overflow-y-scroll pb-10 shadow-lg ring-1 ring-slate-900/10 ring-opacity-10 transition-all dark:ring-slate-300/10">
<Story />
</div>
</div>
) : (
<Story />
)}
</div>
</MemoryRouter>
);
},
];