2016-12-08 14:08:04 +02:00
|
|
|
const React = require('react');
|
|
|
|
const {
|
|
|
|
storiesOf,
|
2017-01-11 12:14:56 +02:00
|
|
|
// action,
|
2016-12-08 19:29:04 +02:00
|
|
|
// linkTo
|
2016-12-08 14:08:04 +02:00
|
|
|
} = require('@kadira/storybook');
|
|
|
|
|
|
|
|
const {
|
|
|
|
Base,
|
|
|
|
Container,
|
|
|
|
Row,
|
|
|
|
Column,
|
2017-01-10 20:06:01 +02:00
|
|
|
MiniMetric: {
|
|
|
|
MiniMetricGraph,
|
|
|
|
MiniMetricMeta,
|
|
|
|
MiniMetricTitle,
|
|
|
|
MiniMetricSubtitle,
|
|
|
|
MiniMetricView
|
|
|
|
},
|
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');
|
|
|
|
|
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', () => (
|
2017-01-10 15:20:33 +02:00
|
|
|
<Base>
|
2016-12-08 14:08:04 +02:00
|
|
|
<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-10 21:12:50 +02:00
|
|
|
<Base>
|
|
|
|
<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>
|
|
|
|
</Base>
|
2017-01-05 15:48:37 +02:00
|
|
|
));
|
2017-01-09 14:13:12 +02:00
|
|
|
|
2017-01-11 16:44:58 +02:00
|
|
|
|