Skip to content

Commit beccb68

Browse files
authored
Merge pull request #8 from Codebrahma/CSS-Fixes
Css fixes
2 parents d3bb862 + f4d8af7 commit beccb68

File tree

19 files changed

+143
-87
lines changed

19 files changed

+143
-87
lines changed

docs/client/components/ComponentsPage/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import React from 'react';
22

33
import CardReadme from '../../../../src/card/readMe.md';
4+
import ButtonReadme from '../../../../src/button/readMe.md';
45

56
import styles from './styles.scss';
67

78
const ComponentsPage = () => (
89
<div className={styles.usage}>
910
<div dangerouslySetInnerHTML={{ __html: CardReadme }} />
11+
<div dangerouslySetInnerHTML={{ __html: ButtonReadme }} />
1012
<div style={{ height: '300px' }} />
1113
</div>
1214
);

docs/client/components/ComponentsPage/styles.scss

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
:local(.usage) {
22
overflow: scroll;
33
height: 800px;
4-
padding: 5%;
4+
padding: 0 5%;
55

66
table, td, th {
7+
padding: 10px;
78
border: 1px solid #d2d2d2;
89
border-collapse: collapse;
910
}
1011
td {
11-
padding: 5px;
12-
font-size: 12px;
12+
font-size: 14px;
1313
height: 40px;
14+
15+
code {
16+
color: #c7254e;
17+
background-color: #f9f2f4;
18+
border-radius: 4px;
19+
}
1420
}
1521
.hljs {
1622
padding: 15px 0px;

docs/client/components/GettingStartedPage/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import styles from './styles.scss';
55

66
const GettingStartedPage = () => (
77
<div className={styles.code}>
8-
<div className="header">
9-
GettingStarted Page
10-
</div>
8+
<h2 className="header">
9+
Getting Started
10+
</h2>
1111
<div className="sub-header">
1212
Installation
1313
</div>
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
:local(.code) {
22
width: 50%;
3-
padding-bottom: 200px;
3+
padding: 1px;
44
margin: 0 auto;
5+
56
.header {
67
font-size: 24px;
78
font-weight: bold;
9+
text-align: center;
810
}
911
.sub-header {
1012
font-size: 18px;
1113
font-weight: bold;
14+
margin-bottom: 10px;
1215
}
16+
1317
.js-code {
14-
padding: 20px;
18+
padding: 15px;
1519
background: #e2e2e2;
1620
margin-bottom: 20px;
1721
min-width: 300px;
@@ -20,5 +24,4 @@
2024
.empty-div {
2125
height: 200px;
2226
}
23-
2427
}

docs/client/components/PlaygroundPage/PlaygroundWithPreview/Preview.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import React from 'react';
22
import ReactDOM from 'react-dom';
33
import PropTypes from 'prop-types';
44
import { transform } from 'babel-standalone';
5-
import Card from '../../../../../src/Card';
5+
import Card from '../../../../../src/card';
6+
import Button from '../../../../../src/button';
67
import theme from '../../../components/common/DefaultCode/theme.scss';
78
import styles from './styles.scss';
89

@@ -75,6 +76,7 @@ class Preview extends React.Component {
7576
}
7677

7778
render () {
79+
console.log('theme ', theme);
7880
return (
7981
<div className={styles.preview}>
8082
<div ref="mount" />
@@ -89,7 +91,7 @@ Preview.propTypes = {
8991
};
9092

9193
Preview.defaultProps = {
92-
scope: { React, Card, theme },
94+
scope: { React, Card, Button, theme },
9395
};
9496

9597
export default Preview;

docs/client/components/PlaygroundPage/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ class PlaygroundPage extends React.Component {
2222
}
2323

2424
handleClickComponent(activeComponent, defaultCode, activeDocs) {
25-
console.log('activeDocs ', activeDocs);
2625
this.setState({
2726
activeComponent,
2827
defaultCode,
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
export const defaultCode = `
2+
class Demo extends React.Component {
3+
render() {
4+
return (
5+
<div>
6+
<div>
7+
<h4>Buttons with diffent styles</h4>
8+
<Button>Default</Button>
9+
<Button type="primary">Primary</Button>
10+
<Button type="secondary">Secondary</Button>
11+
<Button type="success">Success</Button>
12+
<Button type="danger">Danger</Button>
13+
<Button type="warning">Warning</Button>
14+
<Button type="info">Info</Button>
15+
<Button type="light">Light</Button>
16+
<Button type="dark">Dark</Button>
17+
</div>
18+
19+
<div>
20+
<h4>Buttons with diffent sizes</h4>
21+
<Button type="primary" size="small">Small</Button>
22+
<Button type="primary" size="medium">Medium</Button>
23+
<Button type="primary" size="large">Large</Button>
24+
</div>
25+
26+
<div>
27+
<h4>Buttons with Icon</h4>
28+
<Button type="success" icon="done">Left Icon</Button>
29+
<Button type="success" icon="done" iconAlignment="right">Right Icon</Button>
30+
</div>
31+
</div>
32+
)
33+
}
34+
}
35+
36+
return <Demo />;
37+
`;

docs/client/components/common/DefaultCode/Button/style.scss

Whitespace-only changes.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11

2-
export { defaultCode as CardDefaultCode } from './Card';
2+
export { defaultCode as CardDefaultCode } from './card';
3+
export { defaultCode as ButtonDefaultCode } from './button';
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
@import './Card/style.scss';
1+
@import './Card/style.scss';
2+
@import './Button/style.scss';

0 commit comments

Comments
 (0)