@magicgol/polyjuice 0.20.1 → 0.21.0
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/typography/h2/HeadingTwo.vue +1 -1
- package/src/components/typography/h3/HeadingThree.vue +1 -1
- package/src/components/typography/h4/HeadingFour.stories.js +2 -8
- package/src/components/typography/h4/HeadingFour.vue +2 -21
- package/src/components/typography/h5/HeadingFive.stories.js +40 -0
- package/src/components/typography/h5/HeadingFive.vue +45 -0
package/package.json
CHANGED
@@ -6,11 +6,6 @@ export default {
|
|
6
6
|
component: MgHeadingFour,
|
7
7
|
// More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
|
8
8
|
argTypes: {
|
9
|
-
level: {
|
10
|
-
control: { type: 'select' },
|
11
|
-
options: [null, 'club'],
|
12
|
-
defaultValue: null
|
13
|
-
},
|
14
9
|
default: {
|
15
10
|
description: "The default Vue slot",
|
16
11
|
control: {
|
@@ -27,10 +22,9 @@ export default {
|
|
27
22
|
};
|
28
23
|
|
29
24
|
// More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
|
30
|
-
const Template =
|
31
|
-
props: Object.keys(argTypes),
|
25
|
+
const Template = args => ({
|
32
26
|
components: { MgHeadingFour },
|
33
|
-
template: `<mg-heading-four
|
27
|
+
template: `<mg-heading-four><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-heading-four>`,
|
34
28
|
});
|
35
29
|
|
36
30
|
export const Default = Template.bind({});
|
@@ -6,21 +6,10 @@
|
|
6
6
|
export default {
|
7
7
|
name: 'mg-heading-four',
|
8
8
|
|
9
|
-
props: {
|
10
|
-
level: {
|
11
|
-
type: String,
|
12
|
-
default: null,
|
13
|
-
validator: function (value) {
|
14
|
-
return ['club'].indexOf(value) !== -1;
|
15
|
-
},
|
16
|
-
}
|
17
|
-
},
|
18
|
-
|
19
9
|
computed: {
|
20
10
|
classes() {
|
21
11
|
return {
|
22
12
|
'mg-h4': true,
|
23
|
-
'mg-h4--level-club': this.level === 'club',
|
24
13
|
};
|
25
14
|
}
|
26
15
|
},
|
@@ -28,18 +17,10 @@ export default {
|
|
28
17
|
</script>
|
29
18
|
|
30
19
|
<style lang="scss">
|
31
|
-
@import '../../../assets/palette';
|
32
|
-
|
33
20
|
.mg-h4 {
|
34
21
|
color: #343434;
|
35
22
|
font-family: 'Ubuntu', sans-serif;
|
36
|
-
font-size:
|
37
|
-
font-weight:
|
38
|
-
|
39
|
-
&--level {
|
40
|
-
&-club {
|
41
|
-
color: map-get($palette, 'expertClub') !important;
|
42
|
-
}
|
43
|
-
}
|
23
|
+
font-size: 1rem;
|
24
|
+
font-weight: 400;
|
44
25
|
}
|
45
26
|
</style>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import MgHeadingFive from './HeadingFive.vue';
|
2
|
+
|
3
|
+
// More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
|
4
|
+
export default {
|
5
|
+
title: 'Typography/Heading/H5',
|
6
|
+
component: MgHeadingFive,
|
7
|
+
// More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
|
8
|
+
argTypes: {
|
9
|
+
level: {
|
10
|
+
control: { type: 'select' },
|
11
|
+
options: [null, 'club'],
|
12
|
+
defaultValue: null
|
13
|
+
},
|
14
|
+
default: {
|
15
|
+
description: "The default Vue slot",
|
16
|
+
control: {
|
17
|
+
type: 'text',
|
18
|
+
},
|
19
|
+
table: {
|
20
|
+
category: 'Slots',
|
21
|
+
type: {
|
22
|
+
summary: 'html',
|
23
|
+
},
|
24
|
+
}
|
25
|
+
}
|
26
|
+
},
|
27
|
+
};
|
28
|
+
|
29
|
+
// More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
|
30
|
+
const Template = (args, { argTypes }) => ({
|
31
|
+
props: Object.keys(argTypes),
|
32
|
+
components: { MgHeadingFive },
|
33
|
+
template: `<mg-heading-five v-bind="$props"><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-heading-five>`,
|
34
|
+
});
|
35
|
+
|
36
|
+
export const Default = Template.bind({});
|
37
|
+
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
38
|
+
Default.args = {
|
39
|
+
default: 'heading 5'
|
40
|
+
};
|
@@ -0,0 +1,45 @@
|
|
1
|
+
<template>
|
2
|
+
<div v-bind:class="classes"><slot></slot></div>
|
3
|
+
</template>
|
4
|
+
|
5
|
+
<script>
|
6
|
+
export default {
|
7
|
+
name: 'mg-heading-five',
|
8
|
+
|
9
|
+
props: {
|
10
|
+
level: {
|
11
|
+
type: String,
|
12
|
+
default: null,
|
13
|
+
validator: function (value) {
|
14
|
+
return ['club'].indexOf(value) !== -1;
|
15
|
+
},
|
16
|
+
}
|
17
|
+
},
|
18
|
+
|
19
|
+
computed: {
|
20
|
+
classes() {
|
21
|
+
return {
|
22
|
+
'mg-h5': true,
|
23
|
+
'mg-h5--level-club': this.level === 'club',
|
24
|
+
};
|
25
|
+
}
|
26
|
+
},
|
27
|
+
};
|
28
|
+
</script>
|
29
|
+
|
30
|
+
<style lang="scss">
|
31
|
+
@import '../../../assets/palette';
|
32
|
+
|
33
|
+
.mg-h5 {
|
34
|
+
color: #343434;
|
35
|
+
font-family: 'Ubuntu', sans-serif;
|
36
|
+
font-size: 0.875rem;
|
37
|
+
font-weight: 700;
|
38
|
+
|
39
|
+
&--level {
|
40
|
+
&-club {
|
41
|
+
color: map-get($palette, 'expertClub') !important;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
</style>
|