Skip to content

Commit 87628db

Browse files
committedJun 30, 2020
Update mew-banner docs
1 parent 1ab9922 commit 87628db

File tree

8 files changed

+60
-32
lines changed

8 files changed

+60
-32
lines changed
 

‎.storybook/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
22
stories: ['../stories/**/*.stories.(js|mdx)'],
3-
addons: ['@storybook/addon-actions', '@storybook/addon-links', '@storybook/addon-backgrounds/register', '@storybook/addon-docs', '@storybook/addon-knobs/register', '@storybook/addon-viewport/register'],
3+
addons: ['@storybook/addon-actions', '@storybook/addon-links', '@storybook/addon-backgrounds/register', '@storybook/addon-docs', '@storybook/addon-knobs/register', '@storybook/addon-viewport/register', '@storybook/addon-links/register'],
44
};

‎package-lock.json

+1-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"@storybook/addon-backgrounds": "^5.3.17",
5454
"@storybook/addon-docs": "^5.3.18",
5555
"@storybook/addon-knobs": "^5.3.18",
56-
"@storybook/addon-links": "^5.3.17",
56+
"@storybook/addon-links": "^5.3.19",
5757
"@storybook/addon-viewport": "^5.3.17",
5858
"@storybook/addons": "^5.3.17",
5959
"@storybook/source-loader": "^5.3.17",

‎src/components/MewBanner/MewBanner.vue

+25-21
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,31 @@
11
<template>
2-
<div
3-
class="mew-banner full-width font-weight-medium d-flex flex-column align-center justify-center"
2+
<v-container
3+
class="mew-banner full-width font-weight-medium"
44
:style="{backgroundImage: `url(${banner})` }"
55
>
6-
<div
6+
<v-row
77
@click="closeBanner"
8-
class="cursor-pointer error--text exit-container"
8+
class="cursor-pointer error--text exit-container mr-3"
99
>
10-
<v-icon
11-
class="mr-2"
12-
color="error"
13-
>
14-
mdi-close-circle-outline
15-
</v-icon>
16-
<span>{{ textObj.exit }}</span>
17-
</div>
18-
<div class="d-flex text-center align-center justify-center white--text flex-column">
19-
<span class="mew-subtitle">{{ textObj.title }}</span>
20-
<span class="mew-body">{{ textObj.subtext }} </span>
21-
</div>
22-
</div>
10+
<v-col offset-md="6">
11+
<v-icon
12+
class="mr-2"
13+
color="error"
14+
>
15+
mdi-close-circle-outline
16+
</v-icon>
17+
<span>{{ textObj.exit }}</span>
18+
</v-col>
19+
</v-row>
20+
<v-row class="banner-content d-flex text-center align-center justify-center white--text flex-column">
21+
<v-col class="pa-0">
22+
<span class="mew-subtitle">{{ textObj.title }}</span>
23+
</v-col>
24+
<v-col class="pa-0">
25+
<span class="mew-body">{{ textObj.subtext }} </span>
26+
</v-col>
27+
</v-row>
28+
</v-container>
2329
</template>
2430

2531
<script>
@@ -59,15 +65,13 @@ export default {
5965

6066
<style lang="scss" scoped>
6167
.mew-banner {
62-
background-size: contain;
68+
background-size: cover;
6369
border-top-left-radius: 10px;
6470
border-top-right-radius: 10px;
6571
min-height: 190px;
6672
6773
.exit-container {
68-
position: absolute;
69-
right: 80px;
70-
top: 60px;
74+
text-align: right;
7175
}
7276
}
7377
</style>

‎stories/MewBanner/MewBanner.scss

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#story--mewbanner--mew-banner {
2+
.v-application {
3+
height: 250px;
4+
}
5+
}

‎stories/MewBanner/MewBanner.stories.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@ import {
55
files
66
} from '@storybook/addon-knobs';
77
import MewBanner from '@/components/MewBanner/MewBanner.vue';
8+
import MewBannerDoc from './MewBannerDoc.mdx';
89

910
export default {
1011
title: 'MewBanner',
1112
parameters: {
12-
component: MewBanner
13+
component: MewBanner,
14+
docs: {
15+
page: MewBannerDoc
16+
}
1317
},
1418
decorators: [withKnobs]
1519
};

‎stories/MewBanner/MewBannerDoc.mdx

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
import { Story, Preview, Props } from '@storybook/addon-docs/blocks';
3+
import MewBanner from '@/components/MewBanner/MewBanner.vue';
4+
import './MewBanner.scss'
5+
6+
# MEW Banner
7+
MEW Banner is used in the dapps module. It acts as a dapp’s screen header. It has one action, close dapp, which will return the user to the Dapps Center screen. The bannerImg prop is used to show the dapp image, with the Image aspect ratios = []. If the image is not passed, the default MEW picture will be displayed. Please refer to the example below.
8+
<p>*Need: Infographic*</p>
9+
10+
It contains a text object with:
11+
title: this value is used to display the Dapp’s Name.
12+
subtext: this value is used to display a short one sentence description about the dapp.
13+
exit: this value is used to replace the action button text. The default value is ‘Exit Dapp’.
14+
15+
<br />
16+
17+
## Props
18+
<Props of={MewBanner} />
19+
<Preview><Story id="mewbanner--mew-banner" /></Preview>
20+
Codepen: <a href="https://codepen.io/gesseekur/pen/jOWGeeL?editors=1111" id="Bar">Click here</a>
21+

‎stories/MewButton/MewButtonDoc.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Props } from '@storybook/addon-docs/blocks'
22
import MewButton from '@/components/MewButton/MewButton.vue';
33
import defaultBtn from './screenshots/default-btn.png';
44

5-
# MEW Button Docs
5+
# MEW Button
66

77
The mew-button component replaces Vuetify v-btn button with MEW theme options and additional props. This is a flex component with minimum width 64px, centered text and font Size: 14px.
88

0 commit comments

Comments
 (0)
Please sign in to comment.