no in embeds

This commit is contained in:
Sérgio Ramos 2016-10-26 17:32:38 +01:00
parent 7e88e74095
commit f1917acae1
10 changed files with 62 additions and 97 deletions

View File

@ -24,10 +24,10 @@ module.exports = () => {
<Base>
<Container fluid>
<Row>
<Column md={2} xs={12}>
<Column md={2} sm={3} xs={12}>
<Navigation />
</Column>
<Column md={10} xs={12}>
<Column md={10} sm={9} xs={12}>
<Match
component={Home}
exactly

View File

@ -1,7 +1,6 @@
const get = require('lodash.get');
const InnerHTML = require('dangerously-set-inner-html');
const React = require('react');
const styles = require('./style.css');
const titleCase = require('title-case');
const Docs = require('../../../src/docs');
@ -21,7 +20,7 @@ const Item = ({
);
return (
<div className={styles.item}>
<div>
{item}
</div>
);

View File

@ -1,10 +0,0 @@
.item {
flex-grow: 1;
flex-shrink: 1;
flex-basis: auto;
@media (min-width: 48em) {
margin-left: 15rem;
}
}

View File

@ -14,25 +14,23 @@ const styles = require('./style.css');
nmodule.exports = ReactDOM.renderToString(
<Base>
<Container>
<Row>
<Column>
<Button>
Create an Instance
</Button>
</Column>
<Column>
<Button secondary>
Cancel
</Button>
</Column>
<Column>
<Button disabled>
Inactive Button
</Button>
</Column>
</Row>
</Container>
<Row>
<Column>
<Button>
Create an Instance
</Button>
</Column>
<Column>
<Button secondary>
Cancel
</Button>
</Column>
<Column>
<Button disabled>
Inactive Button
</Button>
</Column>
</Row>
</Base>
);
```

View File

@ -14,29 +14,27 @@ const styles = require('./style.css');
nmodule.exports = ReactDOM.renderToString(
<Base>
<Container>
<Row>
<Column>
<Checkbox checked>
Checkbox checked
</Checkbox>
</Column>
</Row>
<Row>
<Column>
<Checkbox>
Checkbox unchecked
</Checkbox>
</Column>
</Row>
<Row>
<Column>
<Checkbox disabled>
Checkbox disabled
</Checkbox>
</Column>
</Row>
</Container>
<Row>
<Column>
<Checkbox checked>
Checkbox checked
</Checkbox>
</Column>
</Row>
<Row>
<Column>
<Checkbox>
Checkbox unchecked
</Checkbox>
</Column>
</Row>
<Row>
<Column>
<Checkbox disabled>
Checkbox disabled
</Checkbox>
</Column>
</Row>
</Base>
);
```

View File

@ -11,7 +11,7 @@ const Row = require('../row');
const Column = require('./index');
const styles = {
container: {
base: {
backgroundColor: '#FFEBEE'
},
row: {
@ -25,13 +25,13 @@ const styles = {
};
nmodule.exports = ReactDOM.renderToString(
<Container style={styles.container}>
<Base style={styles.base}>
<Row style={styles.row} around>
<Column style={styles.column} xs={2}>1</Column>
<Column style={styles.column} xs={2}>2</Column>
<Column style={styles.column} xs={2}>3</Column>
</Row>
</Container>
</Base>
);
```
@ -45,13 +45,11 @@ const Column = require('ui/column');
module.exports = () => {
return (
<Container>
<Row around>
<Column xs={2}>1</Column>
<Column xs={2}>2</Column>
<Column xs={2}>3</Column>
</Row>
</Container>
<Row around>
<Column xs={2}>1</Column>
<Column xs={2}>2</Column>
<Column xs={2}>3</Column>
</Row>
);
};
```

View File

@ -1,18 +1,3 @@
# `<Container>`
## demo
```embed
const React = require('react');
const ReactDOM = require('react-dom/server');
const Container = require('./index.js');
const Button = require('../button');
nmodule.exports = ReactDOM.renderToString(
<Container>
<Button>Hello World</Button>
</Container>
);
```
## usage

View File

@ -10,12 +10,10 @@ const Container = require('../container');
const Button = require('../button');
nmodule.exports = ReactDOM.renderToString(
<Container>
<Row center='xs' start='sm'>
<Button>1</Button>
<Button>2</Button>
</Row>
</Container>
<Row center='xs' start='sm'>
<Button>1</Button>
<Button>2</Button>
</Row>
);
```

View File

@ -14,16 +14,14 @@ const styles = require('./style.css');
nmodule.exports = ReactDOM.renderToString(
<Base>
<Container>
<Row>
<Column>
<Toggle />
</Column>
<Column>
<Toggle off />
</Column>
</Row>
</Container>
<Row>
<Column>
<Toggle />
</Column>
<Column>
<Toggle off />
</Column>
</Row>
</Base>
);
```

View File

@ -11,3 +11,4 @@ test('renders <Button> without exploding', (t) => {
const wrapper = shallow(<Button />);
t.deepEqual(wrapper.length, 1);
});