2020-09-25 04:40:19 -04:00
|
|
|
import OutlinePane from '../js/features/outline/components/outline-pane'
|
2022-05-16 05:38:20 -04:00
|
|
|
import { ScopeDecorator } from './decorators/scope'
|
2020-09-25 04:40:19 -04:00
|
|
|
|
|
|
|
export const Basic = args => <OutlinePane {...args} />
|
|
|
|
Basic.args = {
|
2021-04-27 03:52:58 -04:00
|
|
|
outline: [{ line: 1, title: 'Hello', level: 1 }],
|
2020-09-25 04:40:19 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export const Nested = args => <OutlinePane {...args} />
|
|
|
|
Nested.args = {
|
|
|
|
outline: [
|
|
|
|
{
|
|
|
|
line: 1,
|
|
|
|
title: 'Section',
|
|
|
|
level: 1,
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
line: 2,
|
|
|
|
title: 'Subsection',
|
|
|
|
level: 2,
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
line: 3,
|
|
|
|
title: 'Subsubsection',
|
2021-04-27 03:52:58 -04:00
|
|
|
level: 3,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
2020-09-25 04:40:19 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export const NoSections = args => <OutlinePane {...args} />
|
|
|
|
NoSections.args = {}
|
|
|
|
|
|
|
|
export const NonTexFile = args => <OutlinePane {...args} />
|
|
|
|
NonTexFile.args = {
|
2021-04-27 03:52:58 -04:00
|
|
|
isTexFile: false,
|
2020-09-25 04:40:19 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
2022-03-28 06:23:21 -04:00
|
|
|
title: 'Editor / Outline',
|
2020-09-25 04:40:19 -04:00
|
|
|
component: OutlinePane,
|
|
|
|
argTypes: {
|
2021-04-27 03:52:58 -04:00
|
|
|
jumpToLine: { action: 'jumpToLine' },
|
2020-09-25 04:40:19 -04:00
|
|
|
},
|
|
|
|
args: {
|
|
|
|
eventTracking: { sendMB: () => {} },
|
|
|
|
isTexFile: true,
|
|
|
|
outline: [],
|
|
|
|
jumpToLine: () => {},
|
2021-04-27 03:52:58 -04:00
|
|
|
onToggle: () => {},
|
2020-12-14 06:44:10 -05:00
|
|
|
},
|
2022-05-16 05:38:20 -04:00
|
|
|
decorators: [ScopeDecorator],
|
2020-09-25 04:40:19 -04:00
|
|
|
}
|