@magicgol/polyjuice 0.47.2 → 0.48.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magicgol/polyjuice",
3
- "version": "0.47.2",
3
+ "version": "0.48.0",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -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.8125rem;
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>