@magicgol/polyjuice 0.35.0 → 0.36.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
@@ -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>
|