@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
|
@@ -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
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
OrButton,
|
|
157
|
-
},
|
|
150
|
+
const TemplateIsOpen: StoryFn<typeof OrConfirm> = (args) => ({
|
|
151
|
+
components: {
|
|
152
|
+
OrConfirm,
|
|
153
|
+
OrButton,
|
|
154
|
+
},
|
|
158
155
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
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
|
-
|
|
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 = {
|