adata-ui 0.1.12 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/adata-ui.common.js +20 -21
  2. package/dist/adata-ui.common.js.map +1 -1
  3. package/dist/adata-ui.css +1 -1
  4. package/dist/adata-ui.umd.js +20 -21
  5. package/dist/adata-ui.umd.js.map +1 -1
  6. package/dist/adata-ui.umd.min.js +1 -1
  7. package/dist/adata-ui.umd.min.js.map +1 -1
  8. package/package-lock.json +1065 -136
  9. package/package.json +3 -1
  10. package/public/index.html +2 -2
  11. package/public/logo.svg +4 -0
  12. package/src/components/Alert/Alert.stories.js +5 -5
  13. package/src/components/Button/Button.stories.js +6 -6
  14. package/src/components/Footer/Footer.stories.js +5 -5
  15. package/src/components/Footer/Footer.vue +5 -5
  16. package/src/components/Header/Header.stories.js +6 -6
  17. package/src/components/Header/Header.vue +3 -4
  18. package/src/components/Introduction.stories.mdx +7 -0
  19. package/src/components/PasswordField/PasswordField.stories.js +5 -5
  20. package/src/components/TextField/TextField.stories.js +5 -5
  21. package/src/stories/Button.stories.js +0 -46
  22. package/src/stories/Button.vue +0 -54
  23. package/src/stories/Header.stories.js +0 -21
  24. package/src/stories/Header.vue +0 -59
  25. package/src/stories/Introduction.stories.mdx +0 -211
  26. package/src/stories/Page.stories.js +0 -25
  27. package/src/stories/Page.vue +0 -88
  28. package/src/stories/assets/code-brackets.svg +0 -1
  29. package/src/stories/assets/colors.svg +0 -1
  30. package/src/stories/assets/comments.svg +0 -1
  31. package/src/stories/assets/direction.svg +0 -1
  32. package/src/stories/assets/flow.svg +0 -1
  33. package/src/stories/assets/plugin.svg +0 -1
  34. package/src/stories/assets/repo.svg +0 -1
  35. package/src/stories/assets/stackalt.svg +0 -1
  36. package/src/stories/button.css +0 -30
  37. package/src/stories/header.css +0 -26
  38. package/src/stories/page.css +0 -69
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adata-ui",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -12,6 +12,8 @@
12
12
  "test": "jest"
13
13
  },
14
14
  "dependencies": {
15
+ "@storybook/addons": "^6.4.14",
16
+ "@storybook/theming": "^6.4.14",
15
17
  "core-js": "^3.6.5",
16
18
  "node-sass": "^5.0.0",
17
19
  "user": "0.0.0",
package/public/index.html CHANGED
@@ -4,8 +4,8 @@
4
4
  <meta charset="utf-8">
5
5
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
6
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
7
- <link rel="icon" href="<%= BASE_URL %>favicon.ico">
8
- <title><%= htmlWebpackPlugin.options.title %></title>
7
+ <link rel="icon" href="<%= BASE_URL %>logo.svg">
8
+ <title>Adata UI</title>
9
9
  </head>
10
10
  <body>
11
11
  <noscript>
@@ -0,0 +1,4 @@
1
+ <svg width="40" height="38" viewBox="0 0 28 26" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M13.3117 8.26147H13.2237C13.1861 8.71085 13.0938 9.15443 12.9487 9.58314L11.231 14.7333H15.2706L13.5754 9.63513C13.4383 9.18726 13.3499 8.7269 13.3117 8.26147Z" fill="#2C3E50"/>
3
+ <path d="M24.3463 0H2.70514C1.98769 0 1.29963 0.273926 0.792318 0.76152C0.285006 1.24911 0 1.91044 0 2.6V23.4C0 24.0896 0.285006 24.7509 0.792318 25.2385C1.29963 25.7261 1.98769 26 2.70514 26H24.3463C25.0637 26 25.7518 25.7261 26.2591 25.2385C26.7664 24.7509 27.0514 24.0896 27.0514 23.4V2.6C27.0514 1.91044 26.7664 1.24911 26.2591 0.76152C25.7518 0.273926 25.0637 0 24.3463 0ZM17.2069 20.7242L16.0798 17.3485H10.4666L9.35527 20.7242H5.50721L11.2534 5.55751H15.4689L21.0821 20.7242H17.2069Z" fill="#2C3E50"/>
4
+ </svg>
@@ -1,15 +1,15 @@
1
- import Alert from './Alert.vue'
1
+ import AAlert from './Alert.vue'
2
2
 
3
3
  export default {
4
4
  title: 'Alert',
5
- component: Alert,
6
- template: '<alert>button</alert>'
5
+ component: AAlert,
6
+ template: '<a-alert>button</a-alert>'
7
7
  }
8
8
 
9
9
  const Template = (args, { argTypes }) => ({
10
- components: { Alert },
10
+ components: { AAlert },
11
11
  props: Object.keys(argTypes),
12
- template: '<alert v-bind="$props">Alert</alert>'
12
+ template: '<a-alert v-bind="$props">Alert</a-alert>'
13
13
  })
14
14
 
15
15
  export const Info = Template.bind({})
@@ -1,16 +1,16 @@
1
- import BaseButton from './BaseButton.vue'
1
+ import AButton from './BaseButton.vue'
2
2
  import { action } from "@storybook/addon-actions"
3
3
 
4
4
  export default {
5
- title: 'BaseButton',
6
- component: BaseButton,
7
- template: '<base-button>Button</base-button>'
5
+ title: 'Button',
6
+ component: AButton,
7
+ template: '<a-button>Button</a-button>'
8
8
  }
9
9
 
10
10
  const Template = (args, { argTypes }) => ({
11
- components: { BaseButton },
11
+ components: { AButton },
12
12
  props: Object.keys(argTypes),
13
- template: '<base-button @click="action" v-bind="$props">Button</base-button>',
13
+ template: '<a-button @click="action" v-bind="$props">Button</a-button>',
14
14
  methods: {
15
15
  action: action('click')
16
16
  }
@@ -1,15 +1,15 @@
1
- import Footer from './Footer.vue'
1
+ import AFooter from './Footer.vue'
2
2
 
3
3
  export default {
4
4
  title: 'Footer',
5
- component: Footer,
6
- template: '<Footer></Footer>'
5
+ component: AFooter,
6
+ template: '<a-footer></a-footer>'
7
7
  };
8
8
 
9
9
  const Template = (args, { argTypes }) => ({
10
- components: { Footer },
10
+ components: { AFooter },
11
11
  props: Object.keys(argTypes),
12
- template: '<Footer v-bind="$props"></Footer>'
12
+ template: '<a-footer v-bind="$props"></a-footer>'
13
13
  });
14
14
 
15
15
  export const MainFooter = Template.bind({});
@@ -1,9 +1,9 @@
1
1
  <template>
2
- <footer class="footer" :class="[{'paddinged': hasBottomMenu}]">
3
- <div class="footer__top">
2
+ <footer class="a-footer" :class="[{'paddinged': hasBottomMenu}]">
3
+ <div class="a-footer__top">
4
4
  <ul class="nav">
5
5
  <a class="logo adata-logo" href="https://adata.kz">
6
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 166 48">
6
+ <svg fill="#2C3E50" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 166 48">
7
7
  <path d="M62.926 38.22v-28h10.316c10.342 0 15.511 4.55 15.508 13.652 0 4.36-1.41 7.843-4.232 10.448-2.822 2.605-6.58 3.907-11.276 3.904l-10.316-.004zm6.56-22.868v17.752h3.248c2.839 0 5.069-.82 6.69-2.46 1.622-1.64 2.43-3.873 2.424-6.7 0-2.667-.8-4.767-2.403-6.3-1.602-1.533-3.853-2.297-6.752-2.292h-3.206zM118.5 38.22h-7.131l-2.079-6.228H98.958l-2.079 6.228h-7.093l10.598-28h7.775l10.341 28zm-10.723-11.072l-3.127-9.416a11.94 11.94 0 01-.486-2.516h-.162c-.07.83-.24 1.649-.508 2.44l-3.168 9.492h7.451zm31.833-11.796h-8.316V38.22h-6.557V15.352h-8.274v-5.136h23.147v5.136zM166 38.22h-7.143l-2.079-6.228h-10.349l-2.05 6.228h-7.106l10.598-28h7.776l10.353 28zm-10.719-11.072l-3.127-9.416a11.94 11.94 0 01-.486-2.516h-.163c-.069.83-.239 1.649-.507 2.44l-3.168 9.492h7.451zM24.553 15.252h-.163c-.069.83-.24 1.649-.507 2.44L20.715 27.2h7.45l-3.126-9.412a12.02 12.02 0 01-.486-2.536z"></path>
8
8
  <path d="M44.905 0H4.99a5.091 5.091 0 00-3.528 1.406A4.71 4.71 0 000 4.8v38.4a4.71 4.71 0 001.461 3.394A5.091 5.091 0 004.99 48h39.916a5.091 5.091 0 003.528-1.406 4.71 4.71 0 001.462-3.394V4.8a4.71 4.71 0 00-1.462-3.394A5.091 5.091 0 0044.905 0zM31.737 38.26l-2.079-6.232H19.305l-2.05 6.232h-7.097l10.598-28h7.776l10.353 28h-7.148z"></path>
9
9
  </svg>
@@ -49,7 +49,7 @@
49
49
  </li>
50
50
  </ul>
51
51
  </div>
52
- <div class="footer__bottom"><span>2022 © ТОО "Alldata"</span></div>
52
+ <div class="a-footer__bottom"><span>2022 © ТОО "Alldata"</span></div>
53
53
  </footer>
54
54
  </template>
55
55
 
@@ -82,7 +82,7 @@ a {
82
82
  padding: 0;
83
83
  }
84
84
 
85
- .footer {
85
+ .a-footer {
86
86
  background: #BDC7CE4C;
87
87
  font-size: 14px;
88
88
  margin-top: 20px;
@@ -1,21 +1,21 @@
1
- import Header from './Header.vue'
1
+ import AHeader from './Header.vue'
2
2
  import {action} from "@storybook/addon-actions";
3
3
 
4
4
  export default {
5
5
  title: 'Header',
6
- component: Header,
7
- template: '<Header></Header>'
6
+ component: AHeader,
7
+ template: '<a-header></a-header>'
8
8
  };
9
9
 
10
10
  const Template = (args, { argTypes }) => ({
11
- components: { Header },
11
+ components: { AHeader },
12
12
  props: Object.keys(argTypes),
13
- template: '<Header @menuOpen="openMenu' +
13
+ template: '<a-header @menuOpen="openMenu' +
14
14
  '" @showBalanceModal="showBalance"' +
15
15
  ' @setShowModal="showModal"' +
16
16
  ' @logout="logoutClick"' +
17
17
  ' @setIsReplenishModal="setReplenishModal" v-bind="$props"' +
18
- '></Header>',
18
+ '></a-header>',
19
19
  methods: {
20
20
  openMenu(val) {
21
21
  console.log(val);
@@ -12,7 +12,7 @@
12
12
  <div v-for="(item, index) in subheaderItems"
13
13
  :key="index"
14
14
  class="menu__wrapper menu__items"
15
- :class="{active: locationUrl.includes(item.url)}"
15
+ :class="{active: locationUrl.includes(toAdtdev(item.url))}"
16
16
  @click="handleClick(item.url)"
17
17
  >
18
18
  {{ item.name }}
@@ -21,7 +21,6 @@
21
21
  </div>
22
22
  <div class="a-header__right">
23
23
  <slot name="chooseCountry"></slot>
24
- <slot name="profile"></slot>
25
24
  <Profile
26
25
  v-bind:profileDropDown="profileDropDown"
27
26
  :isDev="isDev"
@@ -63,7 +62,7 @@
63
62
  v-for="(item, index) in subheaderItems"
64
63
  :key="index"
65
64
  class="menu_mobile-wrapper"
66
- :class="{'active-burger-tab': locationUrl.includes(item.url)}"
65
+ :class="{'active-burger-tab': locationUrl.includes(toAdtdev(item.url))}"
67
66
  @click="handleClick(item.url)"
68
67
  >
69
68
  {{ item.name }}
@@ -180,7 +179,7 @@ export default {
180
179
  }
181
180
 
182
181
  .a-header {
183
- width: 100%;
182
+ width: 100vw;
184
183
  background: #ffffff;
185
184
  max-height: 62px;
186
185
  height: 62px;
@@ -0,0 +1,7 @@
1
+ <Meta title="Adata UI Introduction" />
2
+
3
+ # Welcome to Adata UI kit
4
+
5
+
6
+
7
+ to install library run **npm i adata-ui**
@@ -1,15 +1,15 @@
1
- import PasswordField from "./PasswordField.vue";
1
+ import APasswordField from "./PasswordField.vue";
2
2
 
3
3
  export default {
4
4
  title: 'PasswordField',
5
- component: PasswordField,
6
- template: "<password-field label='Example'></password-field>"
5
+ component: APasswordField,
6
+ template: "<a-password-field label='Example'></a-password-field>"
7
7
  }
8
8
 
9
9
  const Template = (args, { argTypes }) => ({
10
- components: { PasswordField },
10
+ components: { APasswordField },
11
11
  props: Object.keys(argTypes),
12
- template: '<password-field v-bind="$props"></password-field>'
12
+ template: '<a-password-field v-bind="$props"></a-password-field>'
13
13
  })
14
14
 
15
15
  export const BasePasswordField = Template.bind({});
@@ -1,16 +1,16 @@
1
- import TextField from "./TextField.vue";
1
+ import ATextField from "./TextField.vue";
2
2
 
3
3
  export default {
4
4
  title: 'TextField',
5
- component: TextField,
5
+ component: ATextField,
6
6
  data: () => ({ value: "" }),
7
- template: "<text-field @input='(val) => {this.value = val}' label='Example'></text-field>>"
7
+ template: "<a-text-field @input='(val) => {this.value = val}' label='Example'></a-text-field>>"
8
8
  }
9
9
 
10
10
  const Template = (args, { argTypes }) => ({
11
- components: { TextField },
11
+ components: { ATextField },
12
12
  props: Object.keys(argTypes),
13
- template: '<text-field v-bind="$props"></text-field>'
13
+ template: '<a-text-field v-bind="$props"></a-text-field>'
14
14
  })
15
15
 
16
16
  export const Clearable = Template.bind({});
@@ -1,46 +0,0 @@
1
- import MyButton from './Button.vue';
2
-
3
- // More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
4
- export default {
5
- title: 'Example/Button',
6
- component: MyButton,
7
- // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
- argTypes: {
9
- backgroundColor: { control: 'color' },
10
- size: {
11
- control: { type: 'select' },
12
- options: ['small', 'medium', 'large'],
13
- },
14
- },
15
- };
16
-
17
- // More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
18
- const Template = (args, { argTypes }) => ({
19
- props: Object.keys(argTypes),
20
- components: { MyButton },
21
- template: '<my-button @onClick="onClick" v-bind="$props" />',
22
- });
23
-
24
- export const Primary = Template.bind({});
25
- // More on args: https://storybook.js.org/docs/vue/writing-stories/args
26
- Primary.args = {
27
- primary: true,
28
- label: 'Button',
29
- };
30
-
31
- export const Secondary = Template.bind({});
32
- Secondary.args = {
33
- label: 'Button',
34
- };
35
-
36
- export const Large = Template.bind({});
37
- Large.args = {
38
- size: 'large',
39
- label: 'Button',
40
- };
41
-
42
- export const Small = Template.bind({});
43
- Small.args = {
44
- size: 'small',
45
- label: 'Button',
46
- };
@@ -1,54 +0,0 @@
1
- <template>
2
- <button type="button" :class="classes" @click="onClick" :style="style">{{ label }}</button>
3
- </template>
4
-
5
- <script>
6
- import './button.css';
7
-
8
- export default {
9
- name: 'my-button',
10
-
11
- props: {
12
- label: {
13
- type: String,
14
- required: true,
15
- },
16
- primary: {
17
- type: Boolean,
18
- default: false,
19
- },
20
- size: {
21
- type: String,
22
- default: 'medium',
23
- validator: function (value) {
24
- return ['small', 'medium', 'large'].indexOf(value) !== -1;
25
- },
26
- },
27
- backgroundColor: {
28
- type: String,
29
- },
30
- },
31
-
32
- computed: {
33
- classes() {
34
- return {
35
- 'storybook-button': true,
36
- 'storybook-button--primary': this.primary,
37
- 'storybook-button--secondary': !this.primary,
38
- [`storybook-button--${this.size}`]: true,
39
- };
40
- },
41
- style() {
42
- return {
43
- backgroundColor: this.backgroundColor,
44
- };
45
- },
46
- },
47
-
48
- methods: {
49
- onClick() {
50
- this.$emit('onClick');
51
- },
52
- },
53
- };
54
- </script>
@@ -1,21 +0,0 @@
1
- import MyHeader from './Header';
2
-
3
- export default {
4
- title: 'Example/Header',
5
- component: MyHeader,
6
- };
7
-
8
- const Template = (args, { argTypes }) => ({
9
- props: Object.keys(argTypes),
10
- components: { MyHeader },
11
- template:
12
- '<my-header :user="user" @onLogin="onLogin" @onLogout="onLogout" @onCreateAccount="onCreateAccount" />',
13
- });
14
-
15
- export const LoggedIn = Template.bind({});
16
- LoggedIn.args = {
17
- user: {},
18
- };
19
-
20
- export const LoggedOut = Template.bind({});
21
- LoggedOut.args = {};
@@ -1,59 +0,0 @@
1
- <template>
2
- <header>
3
- <div class="wrapper">
4
- <div>
5
- <svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
6
- <g fill="none" fill-rule="evenodd">
7
- <path
8
- d="M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z"
9
- fill="#FFF"
10
- />
11
- <path
12
- d="M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z"
13
- fill="#555AB9"
14
- />
15
- <path
16
- d="M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z"
17
- fill="#91BAF8"
18
- />
19
- </g>
20
- </svg>
21
- <h1>Acme</h1>
22
- </div>
23
- <div>
24
- <my-button size="small" @onClick="onLogout" label="Log out" v-if="user" />
25
- <my-button size="small" @onClick="onLogin" label="Log in" v-if="!user" />
26
- <my-button primary size="small" @onClick="onCreateAccount" label="Sign up" v-if="!user" />
27
- </div>
28
- </div>
29
- </header>
30
- </template>
31
-
32
- <script>
33
- import './header.css';
34
- import MyButton from './Button.vue';
35
-
36
- export default {
37
- name: 'my-header',
38
-
39
- components: { MyButton },
40
-
41
- props: {
42
- user: {
43
- type: Object,
44
- },
45
- },
46
-
47
- methods: {
48
- onLogin() {
49
- this.$emit('onLogin');
50
- },
51
- onLogout() {
52
- this.$emit('onLogout');
53
- },
54
- onCreateAccount() {
55
- this.$emit('onCreateAccount');
56
- },
57
- },
58
- };
59
- </script>
@@ -1,211 +0,0 @@
1
- import { Meta } from '@storybook/addon-docs';
2
- import Code from './assets/code-brackets.svg';
3
- import Colors from './assets/colors.svg';
4
- import Comments from './assets/comments.svg';
5
- import Direction from './assets/direction.svg';
6
- import Flow from './assets/flow.svg';
7
- import Plugin from './assets/plugin.svg';
8
- import Repo from './assets/repo.svg';
9
- import StackAlt from './assets/stackalt.svg';
10
-
11
- <Meta title="Example/Introduction" />
12
-
13
- <style>{`
14
- .subheading {
15
- --mediumdark: '#999999';
16
- font-weight: 900;
17
- font-size: 13px;
18
- color: #999;
19
- letter-spacing: 6px;
20
- line-height: 24px;
21
- text-transform: uppercase;
22
- margin-bottom: 12px;
23
- margin-top: 40px;
24
- }
25
-
26
- .link-list {
27
- display: grid;
28
- grid-template-columns: 1fr;
29
- grid-template-rows: 1fr 1fr;
30
- row-gap: 10px;
31
- }
32
-
33
- @media (min-width: 620px) {
34
- .link-list {
35
- row-gap: 20px;
36
- column-gap: 20px;
37
- grid-template-columns: 1fr 1fr;
38
- }
39
- }
40
-
41
- @media all and (-ms-high-contrast:none) {
42
- .link-list {
43
- display: -ms-grid;
44
- -ms-grid-columns: 1fr 1fr;
45
- -ms-grid-rows: 1fr 1fr;
46
- }
47
- }
48
-
49
- .link-item {
50
- display: block;
51
- padding: 20px 30px 20px 15px;
52
- border: 1px solid #00000010;
53
- border-radius: 5px;
54
- transition: background 150ms ease-out, border 150ms ease-out, transform 150ms ease-out;
55
- color: #333333;
56
- display: flex;
57
- align-items: flex-start;
58
- }
59
-
60
- .link-item:hover {
61
- border-color: #1EA7FD50;
62
- transform: translate3d(0, -3px, 0);
63
- box-shadow: rgba(0, 0, 0, 0.08) 0 3px 10px 0;
64
- }
65
-
66
- .link-item:active {
67
- border-color: #1EA7FD;
68
- transform: translate3d(0, 0, 0);
69
- }
70
-
71
- .link-item strong {
72
- font-weight: 700;
73
- display: block;
74
- margin-bottom: 2px;
75
- }
76
-
77
- .link-item img {
78
- height: 40px;
79
- width: 40px;
80
- margin-right: 15px;
81
- flex: none;
82
- }
83
-
84
- .link-item span {
85
- font-size: 14px;
86
- line-height: 20px;
87
- }
88
-
89
- .tip {
90
- display: inline-block;
91
- border-radius: 1em;
92
- font-size: 11px;
93
- line-height: 12px;
94
- font-weight: 700;
95
- background: #E7FDD8;
96
- color: #66BF3C;
97
- padding: 4px 12px;
98
- margin-right: 10px;
99
- vertical-align: top;
100
- }
101
-
102
- .tip-wrapper {
103
- font-size: 13px;
104
- line-height: 20px;
105
- margin-top: 40px;
106
- margin-bottom: 40px;
107
- }
108
-
109
- .tip-wrapper code {
110
- font-size: 12px;
111
- display: inline-block;
112
- }
113
-
114
-
115
- `}</style>
116
-
117
- # Welcome to Storybook
118
-
119
- Storybook helps you build UI components in isolation from your app's business logic, data, and context.
120
- That makes it easy to develop hard-to-reach states. Save these UI states as **stories** to revisit during development, testing, or QA.
121
-
122
- Browse example stories now by navigating to them in the sidebar.
123
- View their code in the `src/stories` directory to learn how they work.
124
- We recommend building UIs with a [**component-driven**](https://componentdriven.org) process starting with atomic components and ending with pages.
125
-
126
- <div className="subheading">Configure</div>
127
-
128
- <div className="link-list">
129
- <a
130
- className="link-item"
131
- href="https://storybook.js.org/docs/react/addons/addon-types"
132
- target="_blank"
133
- >
134
- <img src={Plugin} alt="plugin" />
135
- <span>
136
- <strong>Presets for popular tools</strong>
137
- Easy setup for TypeScript, SCSS and more.
138
- </span>
139
- </a>
140
- <a
141
- className="link-item"
142
- href="https://storybook.js.org/docs/react/configure/webpack"
143
- target="_blank"
144
- >
145
- <img src={StackAlt} alt="Build" />
146
- <span>
147
- <strong>Build configuration</strong>
148
- How to customize webpack and Babel
149
- </span>
150
- </a>
151
- <a
152
- className="link-item"
153
- href="https://storybook.js.org/docs/react/configure/styling-and-css"
154
- target="_blank"
155
- >
156
- <img src={Colors} alt="colors" />
157
- <span>
158
- <strong>Styling</strong>
159
- How to load and configure CSS libraries
160
- </span>
161
- </a>
162
- <a
163
- className="link-item"
164
- href="https://storybook.js.org/docs/react/get-started/setup#configure-storybook-for-your-stack"
165
- target="_blank"
166
- >
167
- <img src={Flow} alt="flow" />
168
- <span>
169
- <strong>Data</strong>
170
- Providers and mocking for data libraries
171
- </span>
172
- </a>
173
- </div>
174
-
175
- <div className="subheading">Learn</div>
176
-
177
- <div className="link-list">
178
- <a className="link-item" href="https://storybook.js.org/docs" target="_blank">
179
- <img src={Repo} alt="repo" />
180
- <span>
181
- <strong>Storybook documentation</strong>
182
- Configure, customize, and extend
183
- </span>
184
- </a>
185
- <a className="link-item" href="https://storybook.js.org/tutorials/" target="_blank">
186
- <img src={Direction} alt="direction" />
187
- <span>
188
- <strong>In-depth guides</strong>
189
- Best practices from leading teams
190
- </span>
191
- </a>
192
- <a className="link-item" href="https://github.com/storybookjs/storybook" target="_blank">
193
- <img src={Code} alt="code" />
194
- <span>
195
- <strong>GitHub project</strong>
196
- View the source and add issues
197
- </span>
198
- </a>
199
- <a className="link-item" href="https://discord.gg/storybook" target="_blank">
200
- <img src={Comments} alt="comments" />
201
- <span>
202
- <strong>Discord chat</strong>
203
- Chat with maintainers and the community
204
- </span>
205
- </a>
206
- </div>
207
-
208
- <div className="tip-wrapper">
209
- <span className="tip">Tip</span>Edit the Markdown in{' '}
210
- <code>src/stories/Introduction.stories.mdx</code>
211
- </div>
@@ -1,25 +0,0 @@
1
- import MyPage from './Page';
2
- import * as HeaderStories from './Header.stories';
3
-
4
- export default {
5
- title: 'Example/Page',
6
- component: MyPage,
7
- };
8
-
9
- const Template = (args, { argTypes }) => ({
10
- props: Object.keys(argTypes),
11
- components: { MyPage },
12
- template:
13
- '<my-page :user="user" @onLogin="onLogin" @onLogout="onLogout" @onCreateAccount="onCreateAccount" />',
14
- });
15
-
16
- export const LoggedIn = Template.bind({});
17
- LoggedIn.args = {
18
- // More on composing args: https://storybook.js.org/docs/vue/writing-stories/args#args-composition
19
- ...HeaderStories.LoggedIn.args,
20
- };
21
-
22
- export const LoggedOut = Template.bind({});
23
- LoggedOut.args = {
24
- ...HeaderStories.LoggedOut.args,
25
- };