@magicgol/polyjuice 0.47.1 → 0.48.0
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
<div class="border rounded">
|
3
3
|
<label
|
4
4
|
class="d-block w-100 m-0 p-2 rounded text-uppercase text-center text-decoration-none"
|
5
|
-
for="toggle-button"
|
5
|
+
:for="name + '-toggle-button'"
|
6
6
|
:class="classes"
|
7
7
|
>
|
8
8
|
<input
|
9
9
|
type="checkbox"
|
10
|
-
id="toggle-button"
|
10
|
+
:id="name + '-toggle-button'"
|
11
11
|
class="d-none"
|
12
12
|
:name="name"
|
13
13
|
:value="value"
|
@@ -6,6 +6,11 @@ export default {
|
|
6
6
|
component: MgParagraph,
|
7
7
|
// More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
|
8
8
|
argTypes: {
|
9
|
+
theme: {
|
10
|
+
control: { type: 'select' },
|
11
|
+
options: [null, 'club'],
|
12
|
+
defaultValue: null
|
13
|
+
},
|
9
14
|
default: {
|
10
15
|
description: "The default Vue slot",
|
11
16
|
control: {
|
@@ -22,9 +27,10 @@ export default {
|
|
22
27
|
};
|
23
28
|
|
24
29
|
// More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
|
25
|
-
const Template = args => ({
|
30
|
+
const Template = (args, { argTypes }) => ({
|
31
|
+
props: Object.keys(argTypes),
|
26
32
|
components: { MgParagraph },
|
27
|
-
template: `<mg-paragraph><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-paragraph>`,
|
33
|
+
template: `<mg-paragraph v-bind="$props"><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-paragraph>`,
|
28
34
|
});
|
29
35
|
|
30
36
|
export const Default = Template.bind({});
|
@@ -6,10 +6,21 @@
|
|
6
6
|
export default {
|
7
7
|
name: 'mg-paragraph',
|
8
8
|
|
9
|
+
props: {
|
10
|
+
theme: {
|
11
|
+
type: String,
|
12
|
+
default: null,
|
13
|
+
validator: function (value) {
|
14
|
+
return ['club'].indexOf(value) !== -1;
|
15
|
+
},
|
16
|
+
}
|
17
|
+
},
|
18
|
+
|
9
19
|
computed: {
|
10
20
|
classes() {
|
11
21
|
return {
|
12
22
|
'mg-paragraph': true,
|
23
|
+
'mg-paragraph--theme-club': this.theme === 'club',
|
13
24
|
};
|
14
25
|
}
|
15
26
|
},
|
@@ -17,9 +28,19 @@ export default {
|
|
17
28
|
</script>
|
18
29
|
|
19
30
|
<style lang="scss">
|
31
|
+
@import '../../../assets/palette';
|
32
|
+
|
20
33
|
.mg-paragraph {
|
21
34
|
font-family: 'Ubuntu', sans-serif;
|
22
|
-
font-size: 0.
|
35
|
+
font-size: 0.875rem;
|
23
36
|
font-weight: 400;
|
37
|
+
|
38
|
+
&--theme {
|
39
|
+
&-club {
|
40
|
+
background: map-get($palette, 'club');
|
41
|
+
-webkit-background-clip: text;
|
42
|
+
-webkit-text-fill-color: transparent;
|
43
|
+
}
|
44
|
+
}
|
24
45
|
}
|
25
46
|
</style>
|