@onereach/ui-components 2.67.1-beta.1985.0 → 2.67.1-beta.1986.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/ui-components",
3
- "version": "2.67.1-beta.1985.0",
3
+ "version": "2.67.1-beta.1986.0",
4
4
  "description": "Vue components library for v2/3",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/auto/index.js",
@@ -6,7 +6,6 @@ import OrConfirm from './OrConfirm.vue';
6
6
  import { ConfirmType } from './props';
7
7
  import { OrButtonV3 as OrButton } from '../or-button-v3';
8
8
  import { ref } from 'vue-demi';
9
- import { useArgs } from '@storybook/client-api';
10
9
 
11
10
  export default {
12
11
  title: 'Components/Confirm',
@@ -148,36 +147,30 @@ const Template: StoryFn<typeof OrConfirm> = (args) => ({
148
147
  `,
149
148
  });
150
149
 
151
- const TemplateIsOpen: StoryFn<typeof OrConfirm> = () => {
152
- const [args, updateArgs] = useArgs();
153
- return {
154
- components: {
155
- OrConfirm,
156
- OrButton,
157
- },
150
+ const TemplateIsOpen: StoryFn<typeof OrConfirm> = (args) => ({
151
+ components: {
152
+ OrConfirm,
153
+ OrButton,
154
+ },
158
155
 
159
- setup() {
160
- const isOpen = ref(args.isOpen);
161
- return {
162
- args,
163
- isOpen,
164
- onOpen: action('open'),
165
- onClose: () => {
166
- isOpen.value = false;
167
- updateArgs({
168
- ...args,
169
- isOpen: false,
170
- });
171
- action('close');
172
- },
173
- onConfirm: (event: any) => {
174
- isOpen.value = false;
175
- action('confirm')(event);
176
- },
177
- };
178
- },
156
+ setup() {
157
+ const isOpen = ref(args.isOpen);
158
+ return {
159
+ args,
160
+ isOpen,
161
+ onOpen: action('open'),
162
+ onClose: () => {
163
+ isOpen.value = false;
164
+ action('close');
165
+ },
166
+ onConfirm: (event: any) => {
167
+ isOpen.value = false;
168
+ action('confirm')(event);
169
+ },
170
+ };
171
+ },
179
172
 
180
- template: `
173
+ template: `
181
174
  <div class="contents">
182
175
  <OrButton @click="isOpen = true">Confirmation modal</OrButton>
183
176
 
@@ -200,8 +193,7 @@ const TemplateIsOpen: StoryFn<typeof OrConfirm> = () => {
200
193
  </OrConfirm>
201
194
  </div>
202
195
  `,
203
- };
204
- };
196
+ });
205
197
 
206
198
  export const Default = Template.bind({});
207
199
  Default.args = {
@@ -133,7 +133,7 @@ const TemplateIsOpen: StoryFn<typeof OrModal> = (args) => ({
133
133
  },
134
134
 
135
135
  setup() {
136
- const isOpen = ref(false);
136
+ const isOpen = ref(args.isOpen);
137
137
 
138
138
  function handleClose() {
139
139
  isOpen.value = false;