File size: 1,751 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import { NavLink } from 'react-router-dom'
import { css } from 'otion'

const activeStyles = {
  background: 'rgb(0 0 0 / 10%)',
  borderLeft: '3px solid #f47560',
  paddingLeft: 9,
}
const active = css(activeStyles)
const link = css({
  color: '#2b2b2b',
  padding: '6px 12px',
  textDecoration: 'none',
  transition: 'all 0.2s linear',
  transitionProperty: 'background',

  ':hover': activeStyles,
})

export default function Navigation() {
  return (
    <div
      className={css({
        background: 'rgb(0 0 0 / 5%)',
        boxShadow: 'rgb(0 0 0 / 10%) 0px 2px 6px',
        display: 'flex',
        flexDirection: 'column',
      })}>
      <NavLink activeClassName={active} className={link} end to="/">
        Home
      </NavLink>
      {[
        ['area-bump', 'AreaBump'],
        ['bar', 'Bar'],
        ['bullet', 'Bullet'],
        ['bump', 'Bump'],
        ['calendar', 'Calendar'],
        ['chord', 'Chord'],
        ['choropleth', 'Choropleth'],
        ['circle-packing', 'CirclePacking'],
        ['funnel', 'Funnel'],
        ['geomap', 'GeoMap'],
        ['heatmap', 'HeatMap'],
        ['line', 'Line'],
        ['marimekko', 'Marimekko'],
        ['network', 'Network'],
        ['parallel-coordinates', 'ParallelCoordinates'],
        ['pie', 'Pie'],
        ['radar', 'Radar'],
        ['sankey', 'Sankey'],
        ['scatterplot', 'ScatterPlot'],
        ['stream', 'Stream'],
        ['sunburst', 'Sunburst'],
        ['swarmplot', 'SwarmPlot'],
        ['treemap', 'TreeMap'],
        ['voronoi', 'Voronoi'],
        ['waffle', 'Waffle'],
      ].map(([to, children]) => (
        <NavLink key={to} activeClassName={active} className={link} to={to}>
          {children}
        </NavLink>
      ))}
    </div>
  )
}