From 82cd395bf7deb8f1df95be5a0bb3f59d0b1108e1 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Mon, 21 Oct 2019 20:06:48 +0200 Subject: Add Facebook components --- components/Facebook/FacebookFeed.stories.js | 13 ++++++++ components/Facebook/FacebookFeed.vue | 29 ++++++++++++++++++ .../Facebook/FacebookFindUsButton.stories.js | 13 ++++++++ components/Facebook/FacebookFindUsButton.vue | 35 ++++++++++++++++++++++ 4 files changed, 90 insertions(+) create mode 100644 components/Facebook/FacebookFeed.stories.js create mode 100644 components/Facebook/FacebookFeed.vue create mode 100644 components/Facebook/FacebookFindUsButton.stories.js create mode 100644 components/Facebook/FacebookFindUsButton.vue (limited to 'components/Facebook') diff --git a/components/Facebook/FacebookFeed.stories.js b/components/Facebook/FacebookFeed.stories.js new file mode 100644 index 0000000..4eced7f --- /dev/null +++ b/components/Facebook/FacebookFeed.stories.js @@ -0,0 +1,13 @@ +import { storiesOf } from '@storybook/vue' +import { center } from '../../.storybook/decorators' + +import FacebookFeed from './FacebookFeed' + +storiesOf('FacebookFeed', module) + .addDecorator(center) + .add('default', () => { + return { + components: { FacebookFeed }, + template: `` + } + }) diff --git a/components/Facebook/FacebookFeed.vue b/components/Facebook/FacebookFeed.vue new file mode 100644 index 0000000..56172f4 --- /dev/null +++ b/components/Facebook/FacebookFeed.vue @@ -0,0 +1,29 @@ + + + + + \ No newline at end of file diff --git a/components/Facebook/FacebookFindUsButton.stories.js b/components/Facebook/FacebookFindUsButton.stories.js new file mode 100644 index 0000000..e76f8f9 --- /dev/null +++ b/components/Facebook/FacebookFindUsButton.stories.js @@ -0,0 +1,13 @@ +import { storiesOf } from '@storybook/vue' +import { center } from '../../.storybook/decorators' + +import FacebookFindUsButton from './FacebookFindUsButton' + +storiesOf('FacebookFindUsButton', module) + .addDecorator(center) + .add('default', () => { + return { + components: { FacebookFindUsButton }, + template: `` + } + }) diff --git a/components/Facebook/FacebookFindUsButton.vue b/components/Facebook/FacebookFindUsButton.vue new file mode 100644 index 0000000..9a27c11 --- /dev/null +++ b/components/Facebook/FacebookFindUsButton.vue @@ -0,0 +1,35 @@ + + + \ No newline at end of file -- cgit 1.4.1 From 64b16669dcab8c0c29c377d12ff6b996b5caa0d3 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Tue, 3 Dec 2019 12:13:26 +0100 Subject: Fix FindUsButton margin --- components/Facebook/FacebookFindUsButton.vue | 29 +++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'components/Facebook') diff --git a/components/Facebook/FacebookFindUsButton.vue b/components/Facebook/FacebookFindUsButton.vue index 9a27c11..05aa9f6 100644 --- a/components/Facebook/FacebookFindUsButton.vue +++ b/components/Facebook/FacebookFindUsButton.vue @@ -1,24 +1,35 @@ \ No newline at end of file + -- cgit 1.4.1 From 34da06762e81f85c5df29fdec66e2055b8b930a9 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Tue, 3 Dec 2019 13:05:15 +0100 Subject: Add missing stories --- components/Buttons/PlainButton.stories.js | 2 +- components/Facebook/FacebookFeed.stories.js | 2 +- .../Facebook/FacebookFindUsButton.stories.js | 2 +- components/PostLink.stories.js | 21 ----- components/PostLink.vue | 74 ------------------ components/PostList/PostList.vue | 55 ------------- components/PostList/PurePostList.stories.js | 30 ------- components/PostList/PurePostList.vue | 91 ---------------------- components/PostList/index.js | 3 - components/Posts/PostLink.stories.js | 21 +++++ components/Posts/PostLink.vue | 74 ++++++++++++++++++ components/Posts/PostList/PostList.vue | 55 +++++++++++++ components/Posts/PostList/PurePostList.stories.js | 30 +++++++ components/Posts/PostList/PurePostList.vue | 91 ++++++++++++++++++++++ components/Posts/PostList/index.js | 3 + components/Ranking/RankingEntry.stories.js | 19 +++++ components/Ranking/RankingFirstEntry.stories.js | 16 ++++ components/Ranking/RankingList.stories.js | 20 +++++ pages/index.vue | 4 +- pages/kronika/index.vue | 2 +- 20 files changed, 335 insertions(+), 280 deletions(-) delete mode 100644 components/PostLink.stories.js delete mode 100644 components/PostLink.vue delete mode 100644 components/PostList/PostList.vue delete mode 100644 components/PostList/PurePostList.stories.js delete mode 100644 components/PostList/PurePostList.vue delete mode 100644 components/PostList/index.js create mode 100644 components/Posts/PostLink.stories.js create mode 100644 components/Posts/PostLink.vue create mode 100644 components/Posts/PostList/PostList.vue create mode 100644 components/Posts/PostList/PurePostList.stories.js create mode 100644 components/Posts/PostList/PurePostList.vue create mode 100644 components/Posts/PostList/index.js create mode 100644 components/Ranking/RankingEntry.stories.js create mode 100644 components/Ranking/RankingFirstEntry.stories.js create mode 100644 components/Ranking/RankingList.stories.js (limited to 'components/Facebook') diff --git a/components/Buttons/PlainButton.stories.js b/components/Buttons/PlainButton.stories.js index 67a657d..43efa24 100644 --- a/components/Buttons/PlainButton.stories.js +++ b/components/Buttons/PlainButton.stories.js @@ -7,7 +7,7 @@ const plainButton = { text: 'Plain Button' } -storiesOf('PlainButton', module) +storiesOf('Buttons/PlainButton', module) .addDecorator(center) .add('default', () => { return { diff --git a/components/Facebook/FacebookFeed.stories.js b/components/Facebook/FacebookFeed.stories.js index 4eced7f..d9ec30a 100644 --- a/components/Facebook/FacebookFeed.stories.js +++ b/components/Facebook/FacebookFeed.stories.js @@ -3,7 +3,7 @@ import { center } from '../../.storybook/decorators' import FacebookFeed from './FacebookFeed' -storiesOf('FacebookFeed', module) +storiesOf('Facebook/FacebookFeed', module) .addDecorator(center) .add('default', () => { return { diff --git a/components/Facebook/FacebookFindUsButton.stories.js b/components/Facebook/FacebookFindUsButton.stories.js index e76f8f9..e6a298b 100644 --- a/components/Facebook/FacebookFindUsButton.stories.js +++ b/components/Facebook/FacebookFindUsButton.stories.js @@ -3,7 +3,7 @@ import { center } from '../../.storybook/decorators' import FacebookFindUsButton from './FacebookFindUsButton' -storiesOf('FacebookFindUsButton', module) +storiesOf('Facebook/FacebookFindUsButton', module) .addDecorator(center) .add('default', () => { return { diff --git a/components/PostLink.stories.js b/components/PostLink.stories.js deleted file mode 100644 index a824b35..0000000 --- a/components/PostLink.stories.js +++ /dev/null @@ -1,21 +0,0 @@ -import { storiesOf } from '@storybook/vue' -import { center } from '../.storybook/decorators' - -import PostLink from './PostLink' - -export const postLink = { - title: 'Test PostLink', - description: - 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar non ex non sagittis. Quisque in enim tellus. Aliquam consequat mi id sapien congue, sit amet vulputate tortor viverra. Donec.', - route: '/kronika/2019/20/11/test' -} - -storiesOf('PostLink', module) - .addDecorator(center) - .add('default', () => { - return { - components: { PostLink }, - template: ``, - data: () => postLink - } - }) diff --git a/components/PostLink.vue b/components/PostLink.vue deleted file mode 100644 index 54cd934..0000000 --- a/components/PostLink.vue +++ /dev/null @@ -1,74 +0,0 @@ - - - - - diff --git a/components/PostList/PostList.vue b/components/PostList/PostList.vue deleted file mode 100644 index 781099f..0000000 --- a/components/PostList/PostList.vue +++ /dev/null @@ -1,55 +0,0 @@ - - - diff --git a/components/PostList/PurePostList.stories.js b/components/PostList/PurePostList.stories.js deleted file mode 100644 index 3cb07f8..0000000 --- a/components/PostList/PurePostList.stories.js +++ /dev/null @@ -1,30 +0,0 @@ -import { storiesOf } from '@storybook/vue' - -import { postLink } from '../PostLink.stories' - -import PurePostList from './PurePostList' - -export const posts = Array(5).fill(postLink) - -storiesOf('PurePostList', module) - .add('default', () => { - return { - components: { PurePostList }, - template: ``, - data: () => ({ posts }) - } - }) - .add('loading', () => { - return { - components: { PurePostList }, - template: ``, - data: () => ({ posts: [] }) - } - }) - .add('no posts', () => { - return { - components: { PurePostList }, - template: ``, - data: () => ({ posts: [] }) - } - }) diff --git a/components/PostList/PurePostList.vue b/components/PostList/PurePostList.vue deleted file mode 100644 index ace069f..0000000 --- a/components/PostList/PurePostList.vue +++ /dev/null @@ -1,91 +0,0 @@ - - - - - diff --git a/components/PostList/index.js b/components/PostList/index.js deleted file mode 100644 index dbb515e..0000000 --- a/components/PostList/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import PostList from './PostList' - -export default PostList diff --git a/components/Posts/PostLink.stories.js b/components/Posts/PostLink.stories.js new file mode 100644 index 0000000..9b12c29 --- /dev/null +++ b/components/Posts/PostLink.stories.js @@ -0,0 +1,21 @@ +import { storiesOf } from '@storybook/vue' +import { center } from '../../.storybook/decorators' + +import PostLink from './PostLink' + +export const postLink = { + title: 'Test PostLink', + description: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar non ex non sagittis. Quisque in enim tellus. Aliquam consequat mi id sapien congue, sit amet vulputate tortor viverra. Donec.', + route: '/kronika/2019/20/11/test' +} + +storiesOf('Posts/PostLink', module) + .addDecorator(center) + .add('default', () => { + return { + components: { PostLink }, + template: ``, + data: () => postLink + } + }) diff --git a/components/Posts/PostLink.vue b/components/Posts/PostLink.vue new file mode 100644 index 0000000..54cd934 --- /dev/null +++ b/components/Posts/PostLink.vue @@ -0,0 +1,74 @@ + + + + + diff --git a/components/Posts/PostList/PostList.vue b/components/Posts/PostList/PostList.vue new file mode 100644 index 0000000..781099f --- /dev/null +++ b/components/Posts/PostList/PostList.vue @@ -0,0 +1,55 @@ + + + diff --git a/components/Posts/PostList/PurePostList.stories.js b/components/Posts/PostList/PurePostList.stories.js new file mode 100644 index 0000000..e2c39de --- /dev/null +++ b/components/Posts/PostList/PurePostList.stories.js @@ -0,0 +1,30 @@ +import { storiesOf } from '@storybook/vue' + +import { postLink } from '../PostLink.stories' + +import PurePostList from './PurePostList' + +export const posts = Array(5).fill(postLink) + +storiesOf('Posts/PurePostList', module) + .add('default', () => { + return { + components: { PurePostList }, + template: ``, + data: () => ({ posts }) + } + }) + .add('loading', () => { + return { + components: { PurePostList }, + template: ``, + data: () => ({ posts: [] }) + } + }) + .add('no posts', () => { + return { + components: { PurePostList }, + template: ``, + data: () => ({ posts: [] }) + } + }) diff --git a/components/Posts/PostList/PurePostList.vue b/components/Posts/PostList/PurePostList.vue new file mode 100644 index 0000000..ace069f --- /dev/null +++ b/components/Posts/PostList/PurePostList.vue @@ -0,0 +1,91 @@ + + + + + diff --git a/components/Posts/PostList/index.js b/components/Posts/PostList/index.js new file mode 100644 index 0000000..dbb515e --- /dev/null +++ b/components/Posts/PostList/index.js @@ -0,0 +1,3 @@ +import PostList from './PostList' + +export default PostList diff --git a/components/Ranking/RankingEntry.stories.js b/components/Ranking/RankingEntry.stories.js new file mode 100644 index 0000000..20bf6e1 --- /dev/null +++ b/components/Ranking/RankingEntry.stories.js @@ -0,0 +1,19 @@ +import { storiesOf } from '@storybook/vue' +import { center } from '../../.storybook/decorators' + +import RankingEntry from './RankingEntry' + +export const rankingEntry = { + troop: 'Test', + points: 32 +} + +storiesOf('Ranking/RankingEntry', module) + .addDecorator(center) + .add('default', () => { + return { + components: { RankingEntry }, + template: ``, + data: () => rankingEntry + } + }) diff --git a/components/Ranking/RankingFirstEntry.stories.js b/components/Ranking/RankingFirstEntry.stories.js new file mode 100644 index 0000000..05fa517 --- /dev/null +++ b/components/Ranking/RankingFirstEntry.stories.js @@ -0,0 +1,16 @@ +import { storiesOf } from '@storybook/vue' +import { center } from '../../.storybook/decorators' + +import RankingFirstEntry from './RankingFirstEntry' + +import { rankingEntry } from './RankingEntry.stories' + +storiesOf('Ranking/RankingFirstEntry', module) + .addDecorator(center) + .add('default', () => { + return { + components: { RankingFirstEntry }, + template: ``, + data: () => rankingEntry + } + }) diff --git a/components/Ranking/RankingList.stories.js b/components/Ranking/RankingList.stories.js new file mode 100644 index 0000000..c7b287d --- /dev/null +++ b/components/Ranking/RankingList.stories.js @@ -0,0 +1,20 @@ +import { storiesOf } from '@storybook/vue' +import { center } from '../../.storybook/decorators' + +import RankingList from './RankingList' + +import { rankingEntry } from './RankingEntry.stories' + +const rankingList = { + scores: Array(3).fill(rankingEntry) +} + +storiesOf('Ranking/RankingList', module) + .addDecorator(center) + .add('default', () => { + return { + components: { RankingList }, + template: ``, + data: () => rankingList + } + }) diff --git a/pages/index.vue b/pages/index.vue index 12caa0c..3a19237 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -12,10 +12,10 @@ \ No newline at end of file + diff --git a/pages/kronika/index.vue b/pages/kronika/index.vue index b478a75..86344c3 100644 --- a/pages/kronika/index.vue +++ b/pages/kronika/index.vue @@ -6,7 +6,7 @@