joyent-portal/packages/icons/src/arrow.js

33 lines
671 B
JavaScript
Raw Permalink Normal View History

import React from 'react';
2017-11-23 14:18:38 +02:00
import Rotate from './rotate';
import calcFill from './fill';
2017-11-23 14:18:38 +02:00
export default ({
fill = null,
light = false,
disabled = false,
direction = 'down',
2018-01-17 21:10:39 +02:00
colors = {},
2017-11-23 14:18:38 +02:00
style = {},
...rest
}) => (
2018-01-17 21:10:39 +02:00
<Rotate direction={direction}>
{({ style: rotateStyle }) => (
<svg
xmlns="http://www.w3.org/2000/svg"
width="9.6"
height="6"
viewBox="0 0 9.6 6"
2018-01-17 21:10:39 +02:00
style={{ ...style, ...rotateStyle }}
{...rest}
>
<path
fill={calcFill({ fill, disabled, light, colors })}
d="M9.6,1.12,8.24,0,4.8,3.5,1.36,0,0,1.12,4.8,6Z"
2018-01-17 21:10:39 +02:00
/>
</svg>
)}
2018-01-17 21:10:39 +02:00
</Rotate>
);