Skip to content

Commit eb6e5ee

Browse files
authored
fix(adobesign): Re-introduce IconAdobeSign (#2784)
1 parent fca6935 commit eb6e5ee

5 files changed

Lines changed: 105 additions & 0 deletions

File tree

scripts/styleguide.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ const allSections = [
126126
{
127127
name: 'Icons',
128128
components: () => [
129+
'../src/icons/adobe-sign/IconAdobeSign.tsx',
129130
'../src/icons/autocad/IconAutoCAD.tsx',
130131
// try not to add to this list but instead add new icons into the
131132
// families of icons below (or create new families where appropriate)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// @flow
2+
import * as React from 'react';
3+
4+
import AccessibleSVG from '../accessible-svg';
5+
6+
type Props = {
7+
className?: string,
8+
height?: number,
9+
/** A text-only string describing the icon if it's not purely decorative for accessibility */
10+
title?: string | React.Element<any>,
11+
width?: number,
12+
};
13+
14+
const IconAdobeSign = ({ className = '', height = 30, title, width = 30 }: Props) => (
15+
<AccessibleSVG
16+
className={`icon-adobe-sign ${className}`}
17+
height={height}
18+
title={title}
19+
viewBox="0 0 30 30"
20+
width={width}
21+
>
22+
<path d="M1.27 1.27h27.45v26.67H1.27z" fill="#260000" />
23+
<path d="M0 0v29.23h30V0zm1.45 1.45h27.1v26.31H1.45z" fill="#ff3601" />
24+
<path d="M5.8 11.59v4.01l1.73 2.76 1.72-2.76v-4.01H5.8M5.68 20.4h19.06v1.04H5.68z" fill="#ff3601" />
25+
<path
26+
d="M24.78 16a.29.29 0 0 0-.2-.16 8.9 8.9 0 0 0-4.64.45c1.24-1.64 1-1.93.91-2.09s-.38-.22-.72-.08a28.23 28.23 0 0 0-3.07 1.54c1-1.54 1.35-2.55 1.1-2.94a.55.55 0 0 0-.58-.23 7.25 7.25 0 0 0-1.13.29c2.07-3.1 2.72-4.71 2.23-5.54-.23-.38-.7-.54-1.39-.46a8.13 8.13 0 0 0-3.77 1.92 5.38 5.38 0 0 0-2.12 2.84 1.17 1.17 0 0 0 1 1.25.31.31 0 0 0 .25 0 .29.29 0 0 0 .16-.2.29.29 0 0 0 0-.24.29.29 0 0 0-.2-.16c-.49-.15-.54-.38-.53-.57.11-1.3 3.49-3.94 5.32-4.16.4 0 .65 0 .74.16.34.58-.59 2.48-2.77 5.64-2.8 1.29-4.85 3.25-5 4.27a.85.85 0 0 0 .48.92.8.8 0 0 0 .44.11c1.15 0 2.61-2 4.54-4.78a7.77 7.77 0 0 1 1.79-.57 13.36 13.36 0 0 1-1.88 3.33.32.32 0 0 0 0 .42.34.34 0 0 0 .41 0 38.86 38.86 0 0 1 4-2.11 15.55 15.55 0 0 1-1.42 1.94.35.35 0 0 0 0 .41.32.32 0 0 0 .38.11c.58-.23 3.56-1.33 5.29-.82a.31.31 0 0 0 .25 0 .35.35 0 0 0 .16-.2.31.31 0 0 0-.03-.29zm-10.22-1.62c-.93 1.31-2.75 3.83-3.45 3.46-.11-.05-.14-.1-.12-.23.1-.72 1.74-2.19 3.57-3.23z"
27+
fill="#facfcb"
28+
/>
29+
</AccessibleSVG>
30+
);
31+
32+
export default IconAdobeSign;
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import * as React from 'react';
2+
3+
import AccessibleSVG from '../accessible-svg';
4+
5+
import { Icon } from '../iconTypes';
6+
7+
const IconAdobeSign = ({ className = '', height = 30, title, width = 30 }: Icon) => (
8+
<AccessibleSVG
9+
className={`icon-adobe-sign ${className}`}
10+
height={height}
11+
title={title}
12+
viewBox="0 0 30 30"
13+
width={width}
14+
>
15+
<path d="M1.27 1.27h27.45v26.67H1.27z" fill="#260000" />
16+
<path d="M0 0v29.23h30V0zm1.45 1.45h27.1v26.31H1.45z" fill="#ff3601" />
17+
<path d="M5.8 11.59v4.01l1.73 2.76 1.72-2.76v-4.01H5.8M5.68 20.4h19.06v1.04H5.68z" fill="#ff3601" />
18+
<path
19+
d="M24.78 16a.29.29 0 0 0-.2-.16 8.9 8.9 0 0 0-4.64.45c1.24-1.64 1-1.93.91-2.09s-.38-.22-.72-.08a28.23 28.23 0 0 0-3.07 1.54c1-1.54 1.35-2.55 1.1-2.94a.55.55 0 0 0-.58-.23 7.25 7.25 0 0 0-1.13.29c2.07-3.1 2.72-4.71 2.23-5.54-.23-.38-.7-.54-1.39-.46a8.13 8.13 0 0 0-3.77 1.92 5.38 5.38 0 0 0-2.12 2.84 1.17 1.17 0 0 0 1 1.25.31.31 0 0 0 .25 0 .29.29 0 0 0 .16-.2.29.29 0 0 0 0-.24.29.29 0 0 0-.2-.16c-.49-.15-.54-.38-.53-.57.11-1.3 3.49-3.94 5.32-4.16.4 0 .65 0 .74.16.34.58-.59 2.48-2.77 5.64-2.8 1.29-4.85 3.25-5 4.27a.85.85 0 0 0 .48.92.8.8 0 0 0 .44.11c1.15 0 2.61-2 4.54-4.78a7.77 7.77 0 0 1 1.79-.57 13.36 13.36 0 0 1-1.88 3.33.32.32 0 0 0 0 .42.34.34 0 0 0 .41 0 38.86 38.86 0 0 1 4-2.11 15.55 15.55 0 0 1-1.42 1.94.35.35 0 0 0 0 .41.32.32 0 0 0 .38.11c.58-.23 3.56-1.33 5.29-.82a.31.31 0 0 0 .25 0 .35.35 0 0 0 .16-.2.31.31 0 0 0-.03-.29zm-10.22-1.62c-.93 1.31-2.75 3.83-3.45 3.46-.11-.05-.14-.1-.12-.23.1-.72 1.74-2.19 3.57-3.23z"
20+
fill="#facfcb"
21+
/>
22+
</AccessibleSVG>
23+
);
24+
25+
export default IconAdobeSign;

src/icons/adobe-sign/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```
2+
<IconAdobeSign />
3+
```
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import React from 'react';
2+
import { shallow } from 'enzyme';
3+
import IconAdobeSign from '../IconAdobeSign';
4+
5+
describe('icons/adobe-sign/IconAdobeSign', () => {
6+
const getWrapper = (props = {}) => shallow(<IconAdobeSign {...props} />);
7+
8+
test('should correctly render default icon', () => {
9+
const wrapper = getWrapper();
10+
11+
expect(wrapper.is('AccessibleSVG')).toBe(true);
12+
expect(wrapper.hasClass('icon-adobe-sign')).toBe(true);
13+
expect(wrapper.prop('height')).toEqual(30);
14+
expect(wrapper.prop('width')).toEqual(30);
15+
});
16+
17+
test('should correctly render icon with specified class', () => {
18+
const className = 'test';
19+
const wrapper = getWrapper({ className });
20+
21+
expect(wrapper.hasClass(className)).toBe(true);
22+
});
23+
24+
test('should correctly render icon with specified height', () => {
25+
const height = 17;
26+
const wrapper = getWrapper({ height });
27+
28+
expect(wrapper.prop('height')).toEqual(height);
29+
});
30+
31+
test('should correctly render icon with specified title', () => {
32+
const title = 'fool';
33+
const wrapper = getWrapper({ title });
34+
35+
expect(wrapper.prop('title')).toEqual(title);
36+
});
37+
38+
test('should correctly render icon with specified width', () => {
39+
const width = 17;
40+
const wrapper = getWrapper({ width });
41+
42+
expect(wrapper.prop('width')).toEqual(width);
43+
});
44+
});

0 commit comments

Comments
 (0)