From fe81f3d551f00d8a5ee5ee4c738e02ffc2d06ecb Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Wed, 27 Nov 2019 23:42:38 +0100 Subject: Add PlainButton --- components/Buttons/PlainButton.stories.js | 18 ++++++++++++++++++ components/Buttons/PlainButton.vue | 30 ++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 components/Buttons/PlainButton.stories.js create mode 100644 components/Buttons/PlainButton.vue (limited to 'components/Buttons') diff --git a/components/Buttons/PlainButton.stories.js b/components/Buttons/PlainButton.stories.js new file mode 100644 index 0000000..67a657d --- /dev/null +++ b/components/Buttons/PlainButton.stories.js @@ -0,0 +1,18 @@ +import { storiesOf } from '@storybook/vue' +import { center } from '../../.storybook/decorators' + +import PlainButton from './PlainButton' + +const plainButton = { + text: 'Plain Button' +} + +storiesOf('PlainButton', module) + .addDecorator(center) + .add('default', () => { + return { + components: { PlainButton }, + template: ``, + data: () => plainButton + } + }) diff --git a/components/Buttons/PlainButton.vue b/components/Buttons/PlainButton.vue new file mode 100644 index 0000000..6e0cde2 --- /dev/null +++ b/components/Buttons/PlainButton.vue @@ -0,0 +1,30 @@ + + + + + \ No newline at end of file -- cgit 1.4.1 From 5bd9880c585cbfde37640e4929009cee5421a2a4 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sun, 1 Dec 2019 14:40:25 +0100 Subject: Fix postlink size --- components/Buttons/PlainButton.vue | 4 ++-- components/PostLink.vue | 8 +++++--- components/PostList/PostList.vue | 11 ++++------- 3 files changed, 11 insertions(+), 12 deletions(-) (limited to 'components/Buttons') diff --git a/components/Buttons/PlainButton.vue b/components/Buttons/PlainButton.vue index 6e0cde2..58a7f83 100644 --- a/components/Buttons/PlainButton.vue +++ b/components/Buttons/PlainButton.vue @@ -1,5 +1,5 @@ - - 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 @@