meriadec
7 years ago
3 changed files with 38 additions and 10 deletions
@ -0,0 +1,29 @@ |
|||||
|
// @flow
|
||||
|
|
||||
|
import React from 'react' |
||||
|
import styled from 'styled-components' |
||||
|
|
||||
|
import Box from 'components/base/Box' |
||||
|
|
||||
|
const UpTriangle = styled.div` |
||||
|
width: 0; |
||||
|
height: 0; |
||||
|
border-left: ${p => p.size}px solid transparent; |
||||
|
border-right: ${p => p.size}px solid transparent; |
||||
|
border-bottom: ${p => p.size}px solid ${p => p.theme.colors[p.color]}; |
||||
|
` |
||||
|
|
||||
|
const DownTriangle = styled.div` |
||||
|
width: 0; |
||||
|
height: 0; |
||||
|
border-left: ${p => p.size}px solid transparent; |
||||
|
border-right: ${p => p.size}px solid transparent; |
||||
|
border-top: ${p => p.size}px solid ${p => p.theme.colors[p.color]}; |
||||
|
` |
||||
|
|
||||
|
export default ({ size = 5, color = 'mouse' }: { size: number, color: string }) => ( |
||||
|
<Box flow={1}> |
||||
|
<UpTriangle size={size} color={color} /> |
||||
|
<DownTriangle size={size} color={color} /> |
||||
|
</Box> |
||||
|
) |
Loading…
Reference in new issue