@magicgol/polyjuice 0.35.0 → 0.36.1
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/components/content/box/vertical-box/VBox.vue +1 -0
- package/src/components/context/club/plate/ClubPlate.stories.js +1 -1
- package/src/components/context/club/square/ClubSquare.stories.js +31 -0
- package/src/components/context/club/square/ClubSquare.vue +64 -0
- package/src/components/form/radio/Radio.vue +6 -0
package/package.json
CHANGED
@@ -2,7 +2,7 @@ import MgClubPlate from './ClubPlate.vue';
|
|
2
2
|
|
3
3
|
// More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
|
4
4
|
export default {
|
5
|
-
title: 'Context/Club/
|
5
|
+
title: 'Context/Club/Plate/Club Plate',
|
6
6
|
component: MgClubPlate,
|
7
7
|
};
|
8
8
|
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import MgClubSquare from './ClubSquare.vue';
|
2
|
+
|
3
|
+
// More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
|
4
|
+
export default {
|
5
|
+
title: 'Context/Club/Square/Club Square',
|
6
|
+
component: MgClubSquare,
|
7
|
+
};
|
8
|
+
|
9
|
+
// More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
|
10
|
+
const Template = (args, { argTypes }) => ({
|
11
|
+
props: Object.keys(argTypes),
|
12
|
+
components: { MgClubSquare },
|
13
|
+
template: `<mg-club-square v-bind="$props"></mg-club-square>`,
|
14
|
+
});
|
15
|
+
|
16
|
+
export const Default = Template.bind({});
|
17
|
+
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
18
|
+
Default.args = {
|
19
|
+
};
|
20
|
+
|
21
|
+
export const Trial = Template.bind({});
|
22
|
+
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
23
|
+
Trial.args = {
|
24
|
+
trial: true
|
25
|
+
};
|
26
|
+
|
27
|
+
export const Disabled = Template.bind({});
|
28
|
+
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
29
|
+
Disabled.args = {
|
30
|
+
disabled: true
|
31
|
+
};
|
@@ -0,0 +1,64 @@
|
|
1
|
+
<template>
|
2
|
+
<div
|
3
|
+
class="d-flex rounded p-2"
|
4
|
+
:class="classes"
|
5
|
+
>
|
6
|
+
<svgicon v-bind:name="icon"></svgicon>
|
7
|
+
</div>
|
8
|
+
</template>
|
9
|
+
|
10
|
+
<script>
|
11
|
+
export default {
|
12
|
+
name: 'mg-club-square',
|
13
|
+
|
14
|
+
props: {
|
15
|
+
trial: {
|
16
|
+
type: Boolean,
|
17
|
+
default: false
|
18
|
+
},
|
19
|
+
|
20
|
+
disabled: {
|
21
|
+
type: Boolean,
|
22
|
+
default: false
|
23
|
+
},
|
24
|
+
},
|
25
|
+
|
26
|
+
computed: {
|
27
|
+
classes() {
|
28
|
+
return {
|
29
|
+
'mg-club-square': true,
|
30
|
+
'mg-club-square--disabled': this.disabled === true,
|
31
|
+
};
|
32
|
+
},
|
33
|
+
icon () {
|
34
|
+
return this.trial ? 'star-stroke-p' : 'star-c';
|
35
|
+
}
|
36
|
+
},
|
37
|
+
};
|
38
|
+
</script>
|
39
|
+
|
40
|
+
<style lang="scss">
|
41
|
+
@import '../../../../assets/palette';
|
42
|
+
|
43
|
+
.mg-club-square {
|
44
|
+
background-color: lighten(map-get($palette, 'expertClub'), 55%);
|
45
|
+
height: 2.25rem;
|
46
|
+
width: 2.25rem;
|
47
|
+
|
48
|
+
svg {
|
49
|
+
fill: map-get($palette, 'expertClub');
|
50
|
+
height: 1.25rem;
|
51
|
+
min-height: 1.25rem;
|
52
|
+
min-width: 1.25rem;
|
53
|
+
width: 1.25rem;
|
54
|
+
}
|
55
|
+
|
56
|
+
&--disabled {
|
57
|
+
background-color: #efefef;
|
58
|
+
|
59
|
+
svg {
|
60
|
+
fill: #6d6d6d;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
</style>
|
@@ -3,6 +3,7 @@
|
|
3
3
|
<input
|
4
4
|
class="d-none"
|
5
5
|
type="radio"
|
6
|
+
:name="name"
|
6
7
|
:value="value"
|
7
8
|
@input="onInput"
|
8
9
|
/>
|
@@ -26,6 +27,11 @@ export default {
|
|
26
27
|
type: Boolean,
|
27
28
|
default: false
|
28
29
|
},
|
30
|
+
|
31
|
+
name: {
|
32
|
+
type: String,
|
33
|
+
default: 'radio'
|
34
|
+
},
|
29
35
|
},
|
30
36
|
|
31
37
|
computed: {
|