joyent-portal/packages/icons/src/instance-count.js

121 lines
3.4 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(), 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="17"
height="17"
viewBox="0 0 17 17"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
style={{ ...style, ...rotateStyle }}
{...rest}
>
<g transform="translate(-1105 974)">
<g>
<g>
<use
xlinkHref={`#${ids[0]}`}
transform="translate(1105 -974)"
fill={calcFill({ fill, disabled, light, colors })}
/>
2017-11-23 14:18:38 +02:00
</g>
2018-01-17 21:10:39 +02:00
<g>
<use
xlinkHref={`#${ids[0]}`}
transform="translate(1111 -974)"
fill={calcFill({ fill, disabled, light, colors })}
2017-11-23 14:18:38 +02:00
/>
2018-01-17 21:10:39 +02:00
</g>
<g>
<use
xlinkHref={`#${ids[0]}`}
transform="translate(1117 -974)"
fill={calcFill({ fill, disabled, light, colors })}
/>
</g>
<g>
<use
xlinkHref={`#${ids[0]}`}
transform="translate(1105 -968)"
fill={calcFill({ fill, disabled, light, colors })}
2017-11-23 14:18:38 +02:00
/>
2018-01-17 21:10:39 +02:00
</g>
<g>
<g>
<use
xlinkHref={`#${ids[1]}`}
transform="translate(1111 -968)"
fill={calcFill({ fill, disabled, light, colors })}
/>
</g>
</g>
<g>
<g>
<use
xlinkHref={`#${ids[1]}`}
transform="translate(1117 -968)"
fill={calcFill({ fill, disabled, light, colors })}
/>
</g>
</g>
<g>
<g>
<use
xlinkHref={`#${ids[1]}`}
transform="translate(1105 -962)"
fill={calcFill({ fill, disabled, light, colors })}
/>
</g>
</g>
<g>
<g>
<use
xlinkHref={`#${ids[1]}`}
transform="translate(1111 -962)"
fill={calcFill({ fill, disabled, light, colors })}
/>
</g>
</g>
<g>
<g>
<use
xlinkHref={`#${ids[1]}`}
transform="translate(1117 -962)"
fill={calcFill({ fill, disabled, light, colors })}
/>
</g>
</g>
</g>
</g>
<defs>
<path
id={ids[0]}
d="M 2.5 5C 3.88071 5 5 3.88071 5 2.5C 5 1.11929 3.88071 0 2.5 0C 1.11929 0 0 1.11929 0 2.5C 0 3.88071 1.11929 5 2.5 5Z"
/>
<path
id={ids[1]}
d="M 2.5 1C 3.3 1 4 1.7 4 2.5C 4 3.3 3.3 4 2.5 4C 1.7 4 1 3.3 1 2.5C 1 1.7 1.7 1 2.5 1ZM 2.5 0C 1.1 0 0 1.1 0 2.5C 0 3.9 1.1 5 2.5 5C 3.9 5 5 3.9 5 2.5C 5 1.1 3.9 0 2.5 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
);