Skip to content
Permalink
Browse files

feat(icons): add CopyIcon (#235)

* feat(icons): add CopyIcon

* feat(icons): update CopyIcon to approved design
  • Loading branch information
hharnisc authored and TheSisb committed Dec 18, 2019
1 parent c97d878 commit d51d0d266514d0a2122f50d0fdeb29b62f7501a0
@@ -3,19 +3,21 @@ import * as React from 'react';
import {Text} from '@twilio-paste/text';
import {Grid, StoryIcon} from './__StoryStyles';

import {CopyIcon} from './src/CopyIcon';
import {LoadingIcon} from './src/LoadingIcon';
import {PlusIcon} from './src/PlusIcon';

interface IconProps {
title?: string;
decorative?: boolean;
decorative: boolean;
size?: number;
color?: string;
}

const IconList: React.FC<IconProps> = props => (
<Grid>
<StoryIcon><LoadingIcon {...props} /><Text as="p">LoadingIcon</Text></StoryIcon>
<StoryIcon><CopyIcon {...props} /><Text as="p">CopyIcon</Text></StoryIcon>
<StoryIcon><LoadingIcon {...props} /><Text as="p">LoadingIcon</Text></StoryIcon>
<StoryIcon><PlusIcon {...props} /><Text as="p">PlusIcon</Text></StoryIcon>
</Grid>
);
@@ -1 +1 @@
export const rollupIconList = ['src/LoadingIcon.tsx', 'src/PlusIcon.tsx'];
export const rollupIconList = ['src/CopyIcon.tsx', 'src/LoadingIcon.tsx', 'src/PlusIcon.tsx'];
@@ -0,0 +1,37 @@
/**
* This file was automatically generated with @twilio-labs/svg-to-react
*/
import * as React from 'react';
import {UID} from 'react-uid';
import {IconWrapper, IconWrapperProps} from './helpers/IconWrapper';

export interface CopyIconProps extends IconWrapperProps {
title?: string;
decorative: boolean;
}

const CopyIcon: React.FC<CopyIconProps> = ({as, size, iconColor, title, decorative}) => {
if (!decorative && title == null) {
throw new Error('[CopyIcon]: Missing a title for non-decorative icon.');
}

return (
<IconWrapper as={as} size={size} iconColor={iconColor}>
<UID>
{uid => (
<svg role="img" aria-hidden={decorative} aria-labelledby={uid} width="100%" height="100%" viewBox="0 0 24 24">
{title ? <title id={uid}>{title}</title> : null}
<path
fill="currentColor"
fillRule="evenodd"
d="M17 1a1 1 0 01.993.883L18 2v4h4a1 1 0 01.993.883L23 7v15a1 1 0 01-1 1H7a1 1 0 01-1-1v-4H2a1 1 0 01-.993-.883L1 17V2a1 1 0 01.883-.993L2 1h15zm4 7H8v13h13V8zm-5-2V3H3v13h3V7a1 1 0 01.883-.993L7 6h9z"
/>
</svg>
)}
</UID>
</IconWrapper>
);
};

CopyIcon.displayName = 'CopyIcon';
export {CopyIcon};
@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path fill="#666A6D" fill-rule="evenodd" d="M17,1 C17.5128358,1 17.9355072,1.38604019 17.9932723,1.88337887 L18,2 L18,6 L22,6 C22.5128358,6 22.9355072,6.38604019 22.9932723,6.88337887 L23,7 L23,22 C23,22.5522847 22.5522847,23 22,23 L22,23 L7,23 C6.44771525,23 6,22.5522847 6,22 L6,22 L6,18 L2,18 C1.48716416,18 1.06449284,17.6139598 1.00672773,17.1166211 L1,17 L1,2 C1,1.48716416 1.38604019,1.06449284 1.88337887,1.00672773 L2,1 L17,1 Z M21,8 L8,8 L8,21 L21,21 L21,8 Z M16,6 L16,3 L3,3 L3,16 L6,16 L6,7 C6,6.48716416 6.38604019,6.06449284 6.88337887,6.00672773 L7,6 L16,6 Z"/>
</svg>

1 comment on commit d51d0d2

@now

This comment has been minimized.

Please sign in to comment.
You can’t perform that action at this time.