From f768d2a4fe38808fd4e2b5c0b9888341652608b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joanna=20Szcz=C4=99ch?= Date: Mon, 20 May 2019 14:20:15 +0200 Subject: [PATCH 01/23] #53585 - Move component to the molecules --- components/src/03-modules/footer/Footer.js | 2 +- .../cookie-message/CookieMessage.html | 0 .../{02-elements => molecules}/cookie-message/CookieMessage.js | 0 .../cookie-message/CookieMessage.scss | 0 .../cookie-message/CookieMessage.stories.js | 2 +- .../{02-elements => molecules}/cookie-message/CookieMessage.vue | 0 6 files changed, 2 insertions(+), 2 deletions(-) rename components/src/{02-elements => molecules}/cookie-message/CookieMessage.html (100%) rename components/src/{02-elements => molecules}/cookie-message/CookieMessage.js (100%) rename components/src/{02-elements => molecules}/cookie-message/CookieMessage.scss (100%) rename components/src/{02-elements => molecules}/cookie-message/CookieMessage.stories.js (92%) rename components/src/{02-elements => molecules}/cookie-message/CookieMessage.vue (100%) diff --git a/components/src/03-modules/footer/Footer.js b/components/src/03-modules/footer/Footer.js index 8dc24bc3b..7eb4a7425 100644 --- a/components/src/03-modules/footer/Footer.js +++ b/components/src/03-modules/footer/Footer.js @@ -3,7 +3,7 @@ import ALink from '../../atoms/link/Link.vue' import AButton from '../../atoms/button/Button.vue' import AList from '../../atoms/list/List.vue' import AListItem from '../../atoms/list-item/ListItem.vue' -import ACookieMessage from '../../02-elements/cookie-message/CookieMessage.vue' +import ACookieMessage from '../../molecules/cookie-message/CookieMessage.vue' import ADropdownList from '../../02-elements/dropdown-list/DropdownList.vue' import ADropdownListItem from '../../02-elements/dropdown-list-item/DropdownListItem.vue' import ANewsletter from '../../03-modules/newsletter/Newsletter.vue' diff --git a/components/src/02-elements/cookie-message/CookieMessage.html b/components/src/molecules/cookie-message/CookieMessage.html similarity index 100% rename from components/src/02-elements/cookie-message/CookieMessage.html rename to components/src/molecules/cookie-message/CookieMessage.html diff --git a/components/src/02-elements/cookie-message/CookieMessage.js b/components/src/molecules/cookie-message/CookieMessage.js similarity index 100% rename from components/src/02-elements/cookie-message/CookieMessage.js rename to components/src/molecules/cookie-message/CookieMessage.js diff --git a/components/src/02-elements/cookie-message/CookieMessage.scss b/components/src/molecules/cookie-message/CookieMessage.scss similarity index 100% rename from components/src/02-elements/cookie-message/CookieMessage.scss rename to components/src/molecules/cookie-message/CookieMessage.scss diff --git a/components/src/02-elements/cookie-message/CookieMessage.stories.js b/components/src/molecules/cookie-message/CookieMessage.stories.js similarity index 92% rename from components/src/02-elements/cookie-message/CookieMessage.stories.js rename to components/src/molecules/cookie-message/CookieMessage.stories.js index 9a6f74839..06e6a611f 100644 --- a/components/src/02-elements/cookie-message/CookieMessage.stories.js +++ b/components/src/molecules/cookie-message/CookieMessage.stories.js @@ -2,7 +2,7 @@ import { storiesOf } from '@storybook/vue' import ACookieMessage from './CookieMessage.vue' -storiesOf('Elements/CookieMessage', module) +storiesOf('Molecules/CookieMessage', module) // @vue/component .add('Default', () => ({ components: { ACookieMessage }, diff --git a/components/src/02-elements/cookie-message/CookieMessage.vue b/components/src/molecules/cookie-message/CookieMessage.vue similarity index 100% rename from components/src/02-elements/cookie-message/CookieMessage.vue rename to components/src/molecules/cookie-message/CookieMessage.vue From e72ddc621d7045f288a6447c4734d31adb6b51d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joanna=20Szcz=C4=99ch?= Date: Mon, 20 May 2019 14:24:14 +0200 Subject: [PATCH 02/23] #53585 - Add 'a' prefix in class --- .../src/molecules/cookie-message/CookieMessage.html | 10 +++++----- .../src/molecules/cookie-message/CookieMessage.scss | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/src/molecules/cookie-message/CookieMessage.html b/components/src/molecules/cookie-message/CookieMessage.html index c8cd2baa7..749695beb 100644 --- a/components/src/molecules/cookie-message/CookieMessage.html +++ b/components/src/molecules/cookie-message/CookieMessage.html @@ -1,23 +1,23 @@
-
diff --git a/components/src/molecules/cookie-message/CookieMessage.js b/components/src/molecules/cookie-message/CookieMessage.js index 886b61d1a..e17bcd0fe 100644 --- a/components/src/molecules/cookie-message/CookieMessage.js +++ b/components/src/molecules/cookie-message/CookieMessage.js @@ -8,10 +8,6 @@ export default { AButton }, props: { - text: { - type: String, - required: true - }, dataType: { type: String, required: true diff --git a/components/src/molecules/cookie-message/CookieMessage.scss b/components/src/molecules/cookie-message/CookieMessage.scss index 418d2cbaa..78fc0abc9 100644 --- a/components/src/molecules/cookie-message/CookieMessage.scss +++ b/components/src/molecules/cookie-message/CookieMessage.scss @@ -57,10 +57,6 @@ $cookie-message__close-icon-transition : $transition-base !default; } } - &__link { - color: $cookie-message__link-color; - } - &__close { display: flex; flex-basis: auto; @@ -107,5 +103,5 @@ $cookie-message__close-icon-transition : $transition-base !default; } .a-cookie-message__text > a { - @extend .a-cookie-message__link; + color: $cookie-message__link-color; } diff --git a/components/src/molecules/cookie-message/CookieMessage.stories.js b/components/src/molecules/cookie-message/CookieMessage.stories.js index 06e6a611f..614a91a2a 100644 --- a/components/src/molecules/cookie-message/CookieMessage.stories.js +++ b/components/src/molecules/cookie-message/CookieMessage.stories.js @@ -1,17 +1,40 @@ import { storiesOf } from '@storybook/vue' +import ALink from '../../atoms/link/Link.vue' import ACookieMessage from './CookieMessage.vue' storiesOf('Molecules/CookieMessage', module) // @vue/component .add('Default', () => ({ - components: { ACookieMessage }, + components: { ACookieMessage, ALink }, template: ` + > + + Example link + + Find out more about their purpose and settings in your browser. By browsing the site you are agreeing to use cookies according to your browser settings." + + ` + })) + .add('With slots', () => ({ + components: { ACookieMessage, ALink }, + template: ` + + + Example link + + Find out more about their purpose and settings in your browser. By browsing the site you are agreeing to use cookies according to your browser settings." + + ` })) From 088e70148f44dcebfc469bd1996e43e503678932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joanna=20Szcz=C4=99ch?= Date: Mon, 20 May 2019 14:54:59 +0200 Subject: [PATCH 05/23] #53585 - Add description for slots and props --- .../molecules/cookie-message/CookieMessage.html | 2 ++ .../src/molecules/cookie-message/CookieMessage.js | 15 +++++++++++++++ .../cookie-message/CookieMessage.spec.js | 0 .../cookie-message/CookieMessage.stories.js | 2 +- 4 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 components/src/molecules/cookie-message/CookieMessage.spec.js diff --git a/components/src/molecules/cookie-message/CookieMessage.html b/components/src/molecules/cookie-message/CookieMessage.html index d996ae9e3..561f79d7d 100644 --- a/components/src/molecules/cookie-message/CookieMessage.html +++ b/components/src/molecules/cookie-message/CookieMessage.html @@ -6,8 +6,10 @@ >