@magicgol/polyjuice 0.16.2 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magicgol/polyjuice",
3
- "version": "0.16.2",
3
+ "version": "0.17.0",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -44,7 +44,7 @@ export default {
44
44
  };
45
45
  },
46
46
  contentVisibility() {
47
- return 'content' in this.$slots && this.value === true;
47
+ return 'content' in this.$slots && !!this.$slots.content && this.value === true;
48
48
  }
49
49
  },
50
50
  };
@@ -0,0 +1,34 @@
1
+ import MgHeadingTwo from './HeadingTwo.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/H2',
6
+ component: MgHeadingTwo,
7
+ // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
+ argTypes: {
9
+ default: {
10
+ description: "The default Vue slot",
11
+ control: {
12
+ type: 'text',
13
+ },
14
+ table: {
15
+ category: 'Slots',
16
+ type: {
17
+ summary: 'html',
18
+ },
19
+ }
20
+ }
21
+ },
22
+ };
23
+
24
+ // More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
25
+ const Template = args => ({
26
+ components: { MgHeadingTwo },
27
+ template: `<mg-heading-two><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-heading-two>`,
28
+ });
29
+
30
+ export const Default = Template.bind({});
31
+ // More on args: https://storybook.js.org/docs/vue/writing-stories/args
32
+ Default.args = {
33
+ default: 'heading 2'
34
+ };
@@ -0,0 +1,26 @@
1
+ <template>
2
+ <div v-bind:class="classes"><slot></slot></div>
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: 'mg-heading-two',
8
+
9
+ computed: {
10
+ classes() {
11
+ return {
12
+ 'mg-h2': true,
13
+ };
14
+ }
15
+ },
16
+ };
17
+ </script>
18
+
19
+ <style lang="scss">
20
+ .mg-h2 {
21
+ color: #343434;
22
+ font-family: 'Ubuntu', sans-serif;
23
+ font-size: 1rem;
24
+ font-weight: 500;
25
+ }
26
+ </style>
@@ -18,8 +18,9 @@ export default {
18
18
 
19
19
  <style lang="scss">
20
20
  .mg-h3 {
21
+ color: #343434;
21
22
  font-family: 'Ubuntu', sans-serif;
22
23
  font-size: 1rem;
23
- font-weight: 500;
24
+ font-weight: 400;
24
25
  }
25
26
  </style>
@@ -18,6 +18,7 @@ export default {
18
18
 
19
19
  <style lang="scss">
20
20
  .mg-h4 {
21
+ color: #343434;
21
22
  font-family: 'Ubuntu', sans-serif;
22
23
  font-size: 0.875rem;
23
24
  font-weight: 700;