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

50 lines
1.1 KiB
JavaScript
Raw Normal View History

2017-11-23 14:18:38 +02:00
import React from 'react';
import rndId from 'rnd-id';
import Rotate from './rotate';
import calcFill from './fill';
const ids = [rndId()];
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
width="12"
height="12"
viewBox="0 0 12 12"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
style={{ ...style, ...rotateStyle }}
{...rest}
>
<g transform="translate(17861 -18582)">
<g>
<use
fill={calcFill({ fill, disabled, light, colors })}
xlinkHref={`#${ids[0]}`}
transform="translate(-17861 18582)"
/>
</g>
</g>
<defs>
<path
id={ids[0]}
fillRule="evenodd"
d="M 7 0L 5 0L 5 5L 0 5L 0 7L 5 7L 5 12L 7 12L 7 7L 12 7L 12 5L 7 5L 7 0Z"
/>
</defs>
</svg>
2017-11-23 14:18:38 +02:00
)}
2018-01-17 21:10:39 +02:00
</Rotate>
2017-11-23 14:18:38 +02:00
);