2016-12-08 14:08:04 +02:00
|
|
|
const React = require('react');
|
|
|
|
const {
|
|
|
|
storiesOf,
|
2016-12-08 19:29:04 +02:00
|
|
|
// action,
|
|
|
|
// linkTo
|
2016-12-08 14:08:04 +02:00
|
|
|
} = require('@kadira/storybook');
|
|
|
|
|
|
|
|
const {
|
|
|
|
Base,
|
|
|
|
Column,
|
2017-01-10 13:55:25 +02:00
|
|
|
Container,
|
2017-01-10 20:06:01 +02:00
|
|
|
MiniMetric: {
|
|
|
|
MiniMetricGraph,
|
|
|
|
MiniMetricMeta,
|
|
|
|
MiniMetricTitle,
|
|
|
|
MiniMetricSubtitle,
|
|
|
|
MiniMetricView
|
2017-01-09 14:13:12 +02:00
|
|
|
},
|
2017-01-10 13:55:25 +02:00
|
|
|
Row,
|
2016-12-08 14:08:04 +02:00
|
|
|
} = require('../src/');
|
|
|
|
|
2017-01-11 16:44:58 +02:00
|
|
|
const MiniMetricData = require('../src/components/list/mini-metric-data');
|
2017-01-06 17:10:37 +02:00
|
|
|
|
2016-12-08 14:08:04 +02:00
|
|
|
const styles = {
|
|
|
|
base: {
|
|
|
|
backgroundColor: '#FFEBEE'
|
|
|
|
},
|
|
|
|
row: {
|
|
|
|
backgroundColor: '#EF5350'
|
|
|
|
},
|
|
|
|
column: {
|
|
|
|
backgroundColor: '#B71C1C',
|
|
|
|
textAlign: 'center',
|
|
|
|
color: 'white'
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
storiesOf('Grid', module)
|
|
|
|
.add('Row and Column', () => (
|
|
|
|
<Base>
|
|
|
|
<Container fluid>
|
|
|
|
<Row>
|
|
|
|
<Column
|
|
|
|
md={10}
|
|
|
|
sm={9}
|
|
|
|
style={styles.base}
|
|
|
|
xs={12}
|
|
|
|
>
|
|
|
|
<Row around style={styles.row}>
|
|
|
|
<Column
|
|
|
|
lg={4}
|
|
|
|
md={3}
|
|
|
|
sm={2}
|
|
|
|
style={styles.column}
|
|
|
|
xs={1}
|
|
|
|
>1</Column>
|
|
|
|
<Column
|
|
|
|
lg={4}
|
|
|
|
md={3}
|
|
|
|
sm={2}
|
|
|
|
style={styles.column}
|
|
|
|
xs={1}
|
|
|
|
>2</Column>
|
|
|
|
<Column
|
|
|
|
lg={4}
|
|
|
|
md={3}
|
|
|
|
sm={2}
|
|
|
|
style={styles.column}
|
|
|
|
xs={1}
|
|
|
|
>3</Column>
|
|
|
|
</Row>
|
|
|
|
</Column>
|
|
|
|
</Row>
|
|
|
|
</Container>
|
|
|
|
</Base>
|
|
|
|
));
|
|
|
|
|
2017-01-05 15:48:37 +02:00
|
|
|
storiesOf('Metrics', module)
|
2017-01-06 13:26:08 +02:00
|
|
|
.add('Mini Metric', () => (
|
2017-01-09 14:13:12 +02:00
|
|
|
<Base>
|
2017-01-10 21:12:50 +02:00
|
|
|
<Row around>
|
|
|
|
<Column xs={3}>
|
|
|
|
<MiniMetricView>
|
|
|
|
<MiniMetricMeta>
|
|
|
|
<MiniMetricTitle>Memory: 54%</MiniMetricTitle>
|
|
|
|
<MiniMetricSubtitle>(1280/3000 MB)</MiniMetricSubtitle>
|
|
|
|
</MiniMetricMeta>
|
2017-01-11 16:44:58 +02:00
|
|
|
<MiniMetricGraph data={MiniMetricData} />
|
2017-01-10 21:12:50 +02:00
|
|
|
</MiniMetricView>
|
|
|
|
</Column>
|
|
|
|
<Column xs={3}>
|
|
|
|
<MiniMetricView>
|
|
|
|
<MiniMetricMeta>
|
|
|
|
<MiniMetricTitle>Memory: 54%</MiniMetricTitle>
|
|
|
|
<MiniMetricSubtitle>(1280/3000 MB)</MiniMetricSubtitle>
|
|
|
|
</MiniMetricMeta>
|
2017-01-11 16:44:58 +02:00
|
|
|
<MiniMetricGraph data={MiniMetricData} />
|
2017-01-10 21:12:50 +02:00
|
|
|
</MiniMetricView>
|
|
|
|
</Column>
|
|
|
|
<Column xs={3}>
|
|
|
|
<MiniMetricView>
|
|
|
|
<MiniMetricMeta>
|
|
|
|
<MiniMetricTitle>Memory: 54%</MiniMetricTitle>
|
|
|
|
<MiniMetricSubtitle>(1280/3000 MB)</MiniMetricSubtitle>
|
|
|
|
</MiniMetricMeta>
|
2017-01-11 16:44:58 +02:00
|
|
|
<MiniMetricGraph data={MiniMetricData} />
|
2017-01-10 21:12:50 +02:00
|
|
|
</MiniMetricView>
|
|
|
|
</Column>
|
|
|
|
</Row>
|
2017-01-09 14:13:12 +02:00
|
|
|
</Base>
|
2017-01-10 13:55:25 +02:00
|
|
|
));
|