/
usa-in-page-navigation.stories.js
44 lines (38 loc) · 1.38 KB
/
usa-in-page-navigation.stories.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import Component from "./usa-in-page-navigation.twig";
import TestCustomContentComponent from "./test/test-patterns/test-custom-content-selector.twig";
import TestCustomHeaderComponent from "./test/test-patterns/test-custom-header-selector.twig";
import TestHiddenHeaderComponent from "./test/test-patterns/test-hidden-headers.twig";
import Content from "./usa-in-page-navigation.json";
export default {
title: "Components/In-Page Navigation",
};
const Template = (args) => Component(args);
const TestCustomContentTemplate = (args) => TestCustomContentComponent(args);
const TestCustomHeaderTemplate = (args) => TestCustomHeaderComponent(args);
const TestHiddenHeaderTemplate = (args) => TestHiddenHeaderComponent(args);
export const Default = Template.bind({});
Default.args = Content;
export const TestCustomContentSelector = TestCustomContentTemplate.bind();
TestCustomContentSelector.args = {
customContentSelector: true,
};
export const TestCustomHeaderSelector = TestCustomHeaderTemplate.bind();
TestCustomHeaderSelector.argTypes = {
headingType: {
defaultValue: "All",
name: "Include these headers in link list",
options: [
"Default",
"All",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6",
"Error - Invalid heading type",
],
control: { type: "select" },
},
};
export const TestHiddenHeaders = TestHiddenHeaderTemplate.bind();