Skip to content

Commit 1fb8b11

Browse files
Merge pull request #480 from aziontech/feat/buttons
feat: button action save/delete/copy
2 parents 19085c5 + cdeecbf commit 1fb8b11

File tree

19 files changed

+839
-0
lines changed

19 files changed

+839
-0
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
import ButtonCancel from '@aziontech/webkit/button-cancel';
2+
3+
export default {
4+
title: 'Components/Buttons/ButtonCancel',
5+
component: ButtonCancel,
6+
tags: ['autodocs'],
7+
argTypes: {
8+
label: {
9+
control: 'text',
10+
description: 'Text displayed on the button'
11+
},
12+
icon: {
13+
control: 'text',
14+
description: 'Icon class (PrimeIcons format)'
15+
},
16+
severity: {
17+
control: 'select',
18+
options: ['', 'secondary', 'success', 'info', 'warning', 'danger', 'contrast'],
19+
description: 'Button severity/style variant'
20+
},
21+
size: {
22+
control: 'select',
23+
options: ['', 'small', 'large'],
24+
description: 'Button size'
25+
},
26+
outlined: {
27+
control: 'boolean',
28+
description: 'Whether the button is outlined'
29+
},
30+
disabled: {
31+
control: 'boolean',
32+
description: 'Whether the button is disabled'
33+
}
34+
}
35+
};
36+
37+
export const Default = {
38+
args: {
39+
label: 'Cancel',
40+
size: ''
41+
}
42+
};
43+
44+
export const WithIcon = {
45+
args: {
46+
label: 'Cancel',
47+
icon: 'pi pi-times',
48+
size: 'large'
49+
}
50+
};
51+
52+
export const Small = {
53+
args: {
54+
label: 'Cancel',
55+
size: 'small'
56+
}
57+
};
58+
59+
export const Filled = {
60+
args: {
61+
label: 'Cancel',
62+
outlined: false,
63+
size: 'large'
64+
}
65+
};
66+
67+
export const Disabled = {
68+
args: {
69+
label: 'Cancel',
70+
disabled: true,
71+
size: 'large'
72+
}
73+
};
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
import ButtonClone from '@aziontech/webkit/button-clone';
2+
3+
export default {
4+
title: 'Components/Buttons/ButtonClone',
5+
component: ButtonClone,
6+
tags: ['autodocs'],
7+
argTypes: {
8+
label: {
9+
control: 'text',
10+
description: 'Text displayed on the button'
11+
},
12+
icon: {
13+
control: 'text',
14+
description: 'Icon class (PrimeIcons format)'
15+
},
16+
severity: {
17+
control: 'select',
18+
options: ['', 'secondary', 'primary', 'success', 'info', 'warning', 'danger', 'contrast'],
19+
description: 'Button severity/style variant'
20+
},
21+
size: {
22+
control: 'select',
23+
options: ['', 'small', 'large'],
24+
description: 'Button size'
25+
},
26+
outlined: {
27+
control: 'boolean',
28+
description: 'Whether the button is outlined'
29+
},
30+
disabled: {
31+
control: 'boolean',
32+
description: 'Whether the button is disabled'
33+
}
34+
}
35+
};
36+
37+
export const Default = {
38+
args: {
39+
label: 'Clone',
40+
size: ''
41+
}
42+
};
43+
44+
export const WithCustomLabel = {
45+
args: {
46+
label: 'Duplicate',
47+
size: 'large'
48+
}
49+
};
50+
51+
export const Small = {
52+
args: {
53+
label: 'Clone',
54+
size: 'small'
55+
}
56+
};
57+
58+
export const Filled = {
59+
args: {
60+
label: 'Clone',
61+
outlined: false,
62+
size: 'large'
63+
}
64+
};
65+
66+
export const Disabled = {
67+
args: {
68+
label: 'Clone',
69+
disabled: true,
70+
size: 'large'
71+
}
72+
};
73+
74+
export const WithCustomIcon = {
75+
args: {
76+
label: 'Clone',
77+
icon: 'pi pi-clone',
78+
size: 'large'
79+
}
80+
};
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
import ButtonCopy from '@aziontech/webkit/button-copy';
2+
3+
export default {
4+
title: 'Components/Buttons/ButtonCopy',
5+
component: ButtonCopy,
6+
tags: ['autodocs'],
7+
argTypes: {
8+
value: {
9+
control: 'text',
10+
description: 'Text value to copy to clipboard (required)'
11+
},
12+
label: {
13+
control: 'text',
14+
description: 'Text displayed on the button'
15+
},
16+
size: {
17+
control: 'select',
18+
options: ['', 'small', 'large'],
19+
description: 'Button size'
20+
},
21+
copiedLabel: {
22+
control: 'text',
23+
description: 'Text displayed after copying'
24+
},
25+
outlined: {
26+
control: 'boolean',
27+
description: 'Whether the button is outlined'
28+
},
29+
disabled: {
30+
control: 'boolean',
31+
description: 'Whether the button is disabled'
32+
},
33+
isCopyVisible: {
34+
control: 'boolean',
35+
description: 'Whether the copy button is visible'
36+
}
37+
}
38+
};
39+
40+
export const Default = {
41+
args: {
42+
value: 'Text to copy',
43+
size: '',
44+
outlined: true
45+
}
46+
};
47+
48+
export const WithLabel = {
49+
args: {
50+
value: 'https://example.com/api/endpoint',
51+
label: 'Copy URL',
52+
size: '',
53+
outlined: true
54+
}
55+
};
56+
57+
export const TextOnly = {
58+
args: {
59+
value: 'Copy this text',
60+
label: 'Copy',
61+
size: '',
62+
outlined: false
63+
}
64+
};
65+
66+
export const Disabled = {
67+
args: {
68+
value: 'Cannot copy this',
69+
label: 'Copy',
70+
disabled: true
71+
}
72+
};
73+
74+
export const CustomCopiedLabel = {
75+
args: {
76+
value: 'Success message',
77+
label: 'Copy',
78+
size: '',
79+
copiedLabel: 'Copied!',
80+
outlined: true
81+
}
82+
};
83+
84+
export const HiddenByDefault = {
85+
args: {
86+
value: 'Hover to reveal',
87+
label: 'Copy',
88+
isCopyVisible: false,
89+
outlined: true
90+
}
91+
};
92+
93+
export const CopyAPIKey = {
94+
args: {
95+
value: 'sk-api-key-12345-abcde-67890-fghij',
96+
label: 'Copy API Key',
97+
size: '',
98+
copiedLabel: 'Key Copied!',
99+
outlined: true
100+
}
101+
};
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
import ButtonCreate from '@aziontech/webkit/button-create';
2+
3+
export default {
4+
title: 'Components/Buttons/ButtonCreate',
5+
component: ButtonCreate,
6+
tags: ['autodocs'],
7+
argTypes: {
8+
label: {
9+
control: 'text',
10+
description: 'Text displayed on the button (required)'
11+
},
12+
icon: {
13+
control: 'text',
14+
description: 'Icon class (PrimeIcons format)'
15+
},
16+
severity: {
17+
control: 'select',
18+
options: ['', 'primary', 'secondary', 'success', 'info', 'warning', 'danger', 'contrast'],
19+
description: 'Button severity/style variant'
20+
},
21+
size: {
22+
control: 'select',
23+
options: ['', 'small', 'large'],
24+
description: 'Button size'
25+
},
26+
outlined: {
27+
control: 'boolean',
28+
description: 'Whether the button is outlined'
29+
},
30+
disabled: {
31+
control: 'boolean',
32+
description: 'Whether the button is disabled'
33+
}
34+
}
35+
};
36+
37+
export const Default = {
38+
args: {
39+
label: 'Create New',
40+
size: ''
41+
}
42+
};
43+
44+
export const WithCustomIcon = {
45+
args: {
46+
label: 'Add Item',
47+
icon: 'pi pi-plus-circle',
48+
size: 'large'
49+
}
50+
};
51+
52+
export const Small = {
53+
args: {
54+
label: 'Create',
55+
size: 'small'
56+
}
57+
};
58+
59+
export const Outlined = {
60+
args: {
61+
label: 'Create New',
62+
outlined: true,
63+
size: 'large'
64+
}
65+
};
66+
67+
export const Disabled = {
68+
args: {
69+
label: 'Create New',
70+
disabled: true,
71+
size: 'large'
72+
}
73+
};
74+
75+
export const Secondary = {
76+
args: {
77+
label: 'Create New',
78+
severity: 'secondary',
79+
size: 'large'
80+
}
81+
};

0 commit comments

Comments
 (0)