@magicgol/polyjuice 0.16.0 → 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.0",
3
+ "version": "0.17.0",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -4,6 +4,7 @@ $palette: (
4
4
  'freemium' :#004781,
5
5
  'coin': #ffcf73,
6
6
  'expertClub': #075169,
7
+ 'text': #343434,
7
8
  // ALERT
8
9
  'error': #ed4949,
9
10
  'warning': #ff614c,
@@ -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
  };
@@ -40,6 +40,9 @@ export default {
40
40
  .mg-traffic-light {
41
41
  border: 2px solid;
42
42
  border-radius: 50px;
43
+ font-family: 'Ubuntu', sans-serif;
44
+ font-size: 1.3125rem;
45
+ font-weight: 500;
43
46
  height: 2.25rem;
44
47
 
45
48
  &--error {
@@ -18,6 +18,7 @@ export default {
18
18
 
19
19
  <style lang="scss">
20
20
  .mg-h1 {
21
+ color: #343434;
21
22
  font-family: 'Ubuntu', sans-serif;
22
23
  font-size: 1.25rem;
23
24
  font-weight: 500;
@@ -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;
@@ -0,0 +1,10 @@
1
+ import {ColorItem, ColorPalette, Meta} from '@storybook/addon-docs';
2
+
3
+ <Meta title="Colors/Brand" />
4
+
5
+ <ColorPalette>
6
+ <ColorItem
7
+ title="Text"
8
+ colors={{'Mine Shaft': '#343434'}}
9
+ />
10
+ </ColorPalette>