Skip to content

Commit 052d4bc

Browse files
frogzsjmergify[bot]
authored andcommitted
feat(icons): add Relay flag icon (#1794)
1 parent c3c601d commit 052d4bc

File tree

4 files changed

+75
-0
lines changed

4 files changed

+75
-0
lines changed

src/icons/general/IconRelayFlag.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// @flow
2+
import * as React from 'react';
3+
4+
import { bdlGray50 } from '../../styles/variables';
5+
import AccessibleSVG from '../accessible-svg';
6+
7+
import type { Icon } from '../flowTypes';
8+
9+
const IconRelayFlag = ({ className = '', height = 16, title, width = 16, color = bdlGray50 }: Icon) => (
10+
<AccessibleSVG
11+
className={`bdl-IconRelayFlag ${className}`}
12+
height={height}
13+
title={title}
14+
viewBox="0 0 16 16"
15+
width={width}
16+
>
17+
<path
18+
fill={color}
19+
fillRule="nonzero"
20+
d="M11.998 2a.51.51 0 0 1 .29.093l-.053-.033a.5.5 0 0 1 .032.019l.02.014a.508.508 0 0 1 .198.297.493.493 0 0 1 .013.11l-.005-.066a.503.503 0 0 1 .004.042V2.5a.509.509 0 0 1-.092.29l.036-.059a.5.5 0 0 1-.025.043l-.011.016-2.235 3.131 3.66 3.203a.508.508 0 0 1 .169.34L14 9.5a.504.504 0 0 1-.124.33l.033-.042A.502.502 0 0 1 13.5 10l.087-.008a.503.503 0 0 1-.048.006L13.5 10H4.911l1.065 3.348a.5.5 0 0 1-.241.594l-.083.034a.5.5 0 0 1-.628-.324l-3.5-11A.507.507 0 0 1 1.5 2.5l.007.083a.497.497 0 0 1-.007-.067V2.5a.51.51 0 0 1 .125-.33.442.442 0 0 1 .088-.08.528.528 0 0 1 .135-.066l-.055.02a.497.497 0 0 1 .043-.017l.012-.003A.507.507 0 0 1 2 2l-.083.007A.497.497 0 0 1 1.985 2H2zM7.025 3H2.683l1.909 6h3.577L5.171 6.376a.508.508 0 0 1-.168-.317.505.505 0 0 1 .09-.35l-.036.06a.501.501 0 0 1 .067-.098l-.042.056.011-.017L7.025 3zm4 0H8.254L6.17 5.921 9.688 9h2.481L9.171 6.376a.508.508 0 0 1-.168-.317.505.505 0 0 1 .09-.35l-.036.06a.501.501 0 0 1 .067-.098l-.042.056.011-.017L11.025 3z"
21+
/>
22+
</AccessibleSVG>
23+
);
24+
25+
export default IconRelayFlag;

src/icons/general/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,12 @@ width?: number,
850850
component: require('./IconRejected').default,
851851
propsDocumentation: iconPropsDocumentation,
852852
},
853+
{
854+
name: 'IconRelayFlag',
855+
component: require('./IconRelayFlag').default,
856+
propsDocumentation: iconPropsDocumentation,
857+
858+
},
853859
{
854860
name: 'IconRemove',
855861
component: require('./IconRemove').default,
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import React from 'react';
2+
3+
import IconRelayFlag from '../IconRelayFlag';
4+
5+
describe('icons/general/IconRelayFlag', () => {
6+
const getWrapper = (props = {}) => shallow(<IconRelayFlag {...props} />);
7+
8+
test('should correctly render default icon', () => {
9+
const wrapper = getWrapper();
10+
expect(wrapper).toMatchSnapshot();
11+
});
12+
13+
test('should correctly render icon with specified width and height', () => {
14+
const width = 16;
15+
const height = 17;
16+
const wrapper = shallow(<IconRelayFlag height={height} width={width} />);
17+
18+
expect(wrapper.find('AccessibleSVG').prop('width')).toEqual(width);
19+
expect(wrapper.find('AccessibleSVG').prop('height')).toEqual(height);
20+
});
21+
22+
test('should correctly render icon with title', () => {
23+
const title = 'relay-flag';
24+
const wrapper = shallow(<IconRelayFlag title={title} />);
25+
26+
expect(wrapper.find('AccessibleSVG').prop('title')).toEqual(title);
27+
});
28+
});
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`icons/general/IconRelayFlag should correctly render default icon 1`] = `
4+
<AccessibleSVG
5+
className="bdl-IconRelayFlag "
6+
height={16}
7+
viewBox="0 0 16 16"
8+
width={16}
9+
>
10+
<path
11+
d="M11.998 2a.51.51 0 0 1 .29.093l-.053-.033a.5.5 0 0 1 .032.019l.02.014a.508.508 0 0 1 .198.297.493.493 0 0 1 .013.11l-.005-.066a.503.503 0 0 1 .004.042V2.5a.509.509 0 0 1-.092.29l.036-.059a.5.5 0 0 1-.025.043l-.011.016-2.235 3.131 3.66 3.203a.508.508 0 0 1 .169.34L14 9.5a.504.504 0 0 1-.124.33l.033-.042A.502.502 0 0 1 13.5 10l.087-.008a.503.503 0 0 1-.048.006L13.5 10H4.911l1.065 3.348a.5.5 0 0 1-.241.594l-.083.034a.5.5 0 0 1-.628-.324l-3.5-11A.507.507 0 0 1 1.5 2.5l.007.083a.497.497 0 0 1-.007-.067V2.5a.51.51 0 0 1 .125-.33.442.442 0 0 1 .088-.08.528.528 0 0 1 .135-.066l-.055.02a.497.497 0 0 1 .043-.017l.012-.003A.507.507 0 0 1 2 2l-.083.007A.497.497 0 0 1 1.985 2H2zM7.025 3H2.683l1.909 6h3.577L5.171 6.376a.508.508 0 0 1-.168-.317.505.505 0 0 1 .09-.35l-.036.06a.501.501 0 0 1 .067-.098l-.042.056.011-.017L7.025 3zm4 0H8.254L6.17 5.921 9.688 9h2.481L9.171 6.376a.508.508 0 0 1-.168-.317.505.505 0 0 1 .09-.35l-.036.06a.501.501 0 0 1 .067-.098l-.042.056.011-.017L11.025 3z"
12+
fill="#909090"
13+
fillRule="nonzero"
14+
/>
15+
</AccessibleSVG>
16+
`;

0 commit comments

Comments
 (0)