From dec87e2a665c5cd1c75686dda388c042a1b042f6 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sat, 9 Nov 2019 08:28:09 +0100 Subject: Add stories for Header & JoinUs --- components/JoinUs.stories.js | 16 +++ components/JoinUs.vue | 5 +- components/NavBar.vue | 211 ---------------------------------------- components/NavLink.stories.js | 19 ++++ components/NavLink.vue | 20 +++- components/TheHeader.stories.js | 24 +++++ components/TheHeader.vue | 183 ++++++++++++++++++++++++++++++++++ layouts/default.vue | 6 +- 8 files changed, 264 insertions(+), 220 deletions(-) create mode 100644 components/JoinUs.stories.js delete mode 100644 components/NavBar.vue create mode 100644 components/NavLink.stories.js create mode 100644 components/TheHeader.stories.js create mode 100644 components/TheHeader.vue diff --git a/components/JoinUs.stories.js b/components/JoinUs.stories.js new file mode 100644 index 0000000..81bf934 --- /dev/null +++ b/components/JoinUs.stories.js @@ -0,0 +1,16 @@ +import { storiesOf } from '@storybook/vue' +import { center } from '../.storybook/decorators' + +import JoinUs from './JoinUs' + +const joinUs = {} + +storiesOf('JoinUs', module) + .addDecorator(center) + .add('default', () => { + return { + components: { JoinUs }, + template: ``, + data: () => joinUs + } + }) diff --git a/components/JoinUs.vue b/components/JoinUs.vue index f534d22..6ffec91 100644 --- a/components/JoinUs.vue +++ b/components/JoinUs.vue @@ -5,7 +5,7 @@
Rozpocznij swoją harcerską przygodę!
- Dołącz do nas! + Dołącz do nas!
@@ -53,10 +53,11 @@ background-color: #507b34; padding: 10px; max-width: 150px; + color: #ffffff; + text-align: center; } .button a { - color: #ffffff; text-decoration: none; } diff --git a/components/NavBar.vue b/components/NavBar.vue deleted file mode 100644 index 4bbae72..0000000 --- a/components/NavBar.vue +++ /dev/null @@ -1,211 +0,0 @@ - - - - - \ No newline at end of file diff --git a/components/NavLink.stories.js b/components/NavLink.stories.js new file mode 100644 index 0000000..44fe6ae --- /dev/null +++ b/components/NavLink.stories.js @@ -0,0 +1,19 @@ +import { storiesOf } from '@storybook/vue' +import { center } from '../.storybook/decorators' + +import NavLink from './NavLink' + +const navLink = { + name: 'Test', + link: '/test' +} + +storiesOf('NavLink', module) + .addDecorator(center) + .add('default', () => { + return { + components: { NavLink }, + template: ``, + data: () => navLink + } + }) diff --git a/components/NavLink.vue b/components/NavLink.vue index bb86ef8..0418172 100644 --- a/components/NavLink.vue +++ b/components/NavLink.vue @@ -9,10 +9,22 @@ diff --git a/components/TheHeader.stories.js b/components/TheHeader.stories.js new file mode 100644 index 0000000..ee320b7 --- /dev/null +++ b/components/TheHeader.stories.js @@ -0,0 +1,24 @@ +import { storiesOf } from '@storybook/vue' +import { routes } from './TheFooter.stories' + +import TheHeader from './TheHeader' + +const header = { + routes, + title: '19 PDH Puszcza', + logo: '/assets/krajka-logo.svg' +} + +const alwaysTop = () => ({ + template: `
` +}) + +storiesOf('TheHeader', module) + .addDecorator(alwaysTop) + .add('default', () => { + return { + components: { TheHeader }, + template: ``, + data: () => header + } + }) diff --git a/components/TheHeader.vue b/components/TheHeader.vue new file mode 100644 index 0000000..431b945 --- /dev/null +++ b/components/TheHeader.vue @@ -0,0 +1,183 @@ + + + + + \ No newline at end of file diff --git a/layouts/default.vue b/layouts/default.vue index 53416bf..58970ba 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -1,18 +1,18 @@