File tree 6 files changed +749
-0
lines changed
6 files changed +749
-0
lines changed Original file line number Diff line number Diff line change
1
+ export const COLORS_DICT = {
2
+ NICE_GREEN : '#0BB071' ,
3
+ NICE_RED : '#FF6A6A' ,
4
+ MIDDLE_GREY : '#BDBDBD' ,
5
+ DARK_GREY : '#666666' ,
6
+ NICE_BLUE : '#2C98F0' ,
7
+ DARKER_BLUE : '#4797f2' ,
8
+ TEXT : '#212121' ,
9
+ WHITE : '#FFFFFF' ,
10
+ TRANSPARENT : 'transparent' ,
11
+ } ;
Original file line number Diff line number Diff line change
1
+ export const ACTIONS_DICT = {
2
+ CANCEL : 'cancel' ,
3
+ CLOSE : 'close' ,
4
+ SAVE : 'save' ,
5
+ SUBMIT : 'submit' ,
6
+ DELETE : 'delete' ,
7
+ SPACER : 'spacer' ,
8
+ NEXT : 'next' ,
9
+ BACK : 'back' ,
10
+ } ;
11
+
12
+ export const ACTIONS_LABELS = {
13
+ [ ACTIONS_DICT . CANCEL ] : 'Cancel' ,
14
+ [ ACTIONS_DICT . CLOSE ] : 'Close' ,
15
+ [ ACTIONS_DICT . SAVE ] : 'Save' ,
16
+ [ ACTIONS_DICT . SUBMIT ] : 'Submit' ,
17
+ [ ACTIONS_DICT . DELETE ] : 'Delete' ,
18
+ [ ACTIONS_DICT . NEXT ] : 'Next' ,
19
+ [ ACTIONS_DICT . BACK ] : 'Back' ,
20
+ } ;
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ export { default as Menu } from '~widgets/menu/widget.vue';
18
18
export { default as Textarea } from '~widgets/textarea/widget.vue' ;
19
19
export { default as Alert } from '~widgets/alert/widget.vue' ;
20
20
export { default as Radio } from '~widgets/radio/widget.vue' ;
21
+ export { default as Dialog } from '~widgets/dialog/widget.vue' ;
21
22
22
23
export { default as store } from '~core/store' ;
23
24
export { default as bus } from '~core/eventBus' ;
Original file line number Diff line number Diff line change
1
+ import Dialog from '~widgets/dialog/widget.vue' ;
2
+ import registerWidget from '~core/registerWidget' ;
3
+
4
+ registerWidget ( 'ui-dialog' , Dialog ) ;
5
+
6
+ export default {
7
+ title : 'Components/Dialog' ,
8
+ component : Dialog ,
9
+ parameters : {
10
+ layout : 'centered' ,
11
+ } ,
12
+ } ;
13
+
14
+ export const Component = {
15
+ render : ( args ) => ( {
16
+ setup ( ) {
17
+ return { args } ;
18
+ } ,
19
+ template : `
20
+ <ui-dialog v-bind="args" style="position: relative;">
21
+ <div slot>
22
+ {{ args.content }}
23
+ </div>
24
+ </ui-dialog>` ,
25
+ } ) ,
26
+
27
+ args : {
28
+ value : true ,
29
+ title : 'Dialog Title' ,
30
+ actions : [ 'cancel' , 'submit' ] ,
31
+ height : '500px' ,
32
+ width : '800px' ,
33
+ isValid : true ,
34
+ submitLabel : 'Submit' ,
35
+ content : 'This is the dialog content :-)' ,
36
+ } ,
37
+ decorators : [ ( ) => ( { template : '<div style="height: 600px;"><story/></div>' } ) ] ,
38
+ } ;
You can’t perform that action at this time.
0 commit comments