Skip to content

Commit 66609aa

Browse files
author
Sravan S
authored
feat: Improve welcome page of storybook (#571)
Center the text and add some background color
1 parent 100a5fc commit 66609aa

File tree

2 files changed

+52
-25
lines changed

2 files changed

+52
-25
lines changed

src/modules/App/stories/index.stories.js

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,35 @@ export default { title: 'App-Component' };
2222
export const versionInfo = () => {
2323
const [showAll, setshowAll] = useState(false);
2424
return (
25-
<>
26-
<div>UIKit: {pkg.version}</div>
27-
<div>Sendbird SDK: {pkg.dependencies['@sendbird/chat']}</div>
28-
<button onClick={() => { setshowAll(!showAll) }}>Show all</button>
29-
{
30-
showAll && (
31-
<div>
32-
<p>dependencies</p>
33-
{
34-
Object.keys(pkg.dependencies)
35-
.map((p) => (
36-
<div key={p}>{p}: {pkg.dependencies[p]}</div>
37-
))
38-
}
39-
<p>Dev-dependencies</p>
40-
{
41-
Object.keys(pkg.devDependencies)
42-
.map((p) => (
43-
<div key={p}>{p}: {pkg.devDependencies[p]}</div>
44-
))
45-
}
46-
</div>
47-
)
48-
}
49-
</>
25+
<div className='sendbird-welcome'>
26+
<div className='sendbird-welcome__content'>
27+
<h1>@sendbird/uikit-react</h1>
28+
<a href='https://www.npmjs.com/package/@sendbird/uikit-react'>npm</a>
29+
<h4>UIKit: {pkg.version}</h4>
30+
<h4>Sendbird SDK: {pkg.dependencies['@sendbird/chat']}</h4>
31+
<button onClick={() => { setshowAll(!showAll) }}>Show all</button>
32+
{
33+
showAll && (
34+
<div className='sendbird-welcome__dependencies'>
35+
<h5>Dependencies</h5>
36+
{
37+
Object.keys(pkg.dependencies)
38+
.map((p) => (
39+
<div key={p}>{p}: {pkg.dependencies[p]}</div>
40+
))
41+
}
42+
<h5>Dev.dependencies</h5>
43+
{
44+
Object.keys(pkg.devDependencies)
45+
.map((p) => (
46+
<div key={p}>{p}: {pkg.devDependencies[p]}</div>
47+
))
48+
}
49+
</div>
50+
)
51+
}
52+
</div>
53+
</div>
5054
);
5155
}
5256

src/modules/App/stories/integrated-app.scss

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
@import '../../../styles/variables';
22

3+
.sendbird-welcome {
4+
display: flex;
5+
height: 100vh;
6+
width: 100vw;
7+
justify-content: center;
8+
align-items: center;
9+
font-family: var(--sendbird-font-family-default);;
10+
@include themed() {
11+
background-color: t(bg-8);
12+
color: t(on-bg-1);
13+
}
14+
}
15+
16+
.sendbird-welcome__content {
17+
text-align: center;
18+
}
19+
20+
.sendbird-welcome__dependencies {
21+
max-height: 200px;
22+
overflow-y: scroll;
23+
text-align: left;
24+
}
25+
326
.sendbird-integrated-sample-app {
427
position: relative;
528
display: flex;

0 commit comments

Comments
 (0)