/
HomeLine.js
31 lines (29 loc) · 1016 Bytes
/
HomeLine.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import React from 'react'
import { generateDrinkStats } from '@nivo/generators'
import { ResponsiveLine } from '@nivo/line'
import { HomeItem, HomeItemLabel } from './styled'
import { commonAxes } from './settings'
const HomeLine = ({ colors, theme, nivoTheme }) => {
return (
<HomeItem to="/line/">
<ResponsiveLine
margin={{ top: 10, bottom: 15, left: 24, right: 10 }}
data={generateDrinkStats(12)}
yScale={{ type: 'linear', stacked: true }}
curve="monotoneX"
theme={nivoTheme}
colors={colors}
animate={false}
isInteractive={false}
{...commonAxes}
dotSize={7}
dotBorderWidth={1}
dotBorderColor={theme.colors.coloredRange[2]}
/>
<HomeItemLabel>
<span>Line documentation</span>
</HomeItemLabel>
</HomeItem>
)
}
export default HomeLine