Skip to content

Commit

Permalink
feat(icons): add checkmark circle icon (#317)
Browse files Browse the repository at this point in the history
Co-authored-by: Shadi <TheSisb@users.noreply.github.com>
  • Loading branch information
m-shykula and TheSisb committed Feb 19, 2020
1 parent 133e259 commit af76993
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/paste-icons/__IconList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {Text} from '@twilio-paste/text';
import {IconSize, TextColor} from '@twilio-paste/types';
import {Grid, StoryIcon} from './__StoryStyles';

import {CheckmarkCircleIcon} from './src/CheckmarkCircleIcon';
import {CloseIcon} from './src/CloseIcon';
import {CopyIcon} from './src/CopyIcon';
import {ErrorIcon} from './src/ErrorIcon';
Expand All @@ -23,7 +24,8 @@ interface IconProps {

const IconList: React.FC<IconProps> = props => (
<Grid>
<StoryIcon><CloseIcon {...props} /><Text as="p" textColor="currentColor">CloseIcon</Text></StoryIcon>
<StoryIcon><CheckmarkCircleIcon {...props} /><Text as="p" textColor="currentColor">CheckmarkCircleIcon</Text></StoryIcon>
<StoryIcon><CloseIcon {...props} /><Text as="p" textColor="currentColor">CloseIcon</Text></StoryIcon>
<StoryIcon><CopyIcon {...props} /><Text as="p" textColor="currentColor">CopyIcon</Text></StoryIcon>
<StoryIcon><ErrorIcon {...props} /><Text as="p" textColor="currentColor">ErrorIcon</Text></StoryIcon>
<StoryIcon><InformationIcon {...props} /><Text as="p" textColor="currentColor">InformationIcon</Text></StoryIcon>
Expand Down
2 changes: 1 addition & 1 deletion packages/paste-icons/rollup.icon-list.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions packages/paste-icons/src/CheckmarkCircleIcon.tsx
Original file line number Diff line number Diff line change
@@ -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 CheckmarkCircleIconProps extends IconWrapperProps {
title?: string;
decorative: boolean;
}

const CheckmarkCircleIcon: React.FC<CheckmarkCircleIconProps> = ({as, size, iconColor, title, decorative}) => {
if (!decorative && title == null) {
throw new Error('[CheckmarkCircleIcon]: 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="M12 4a8 8 0 110 16 8 8 0 010-16zm0 1a7 7 0 100 14 7 7 0 000-14zm4.31 3.16a.5.5 0 01.132.627l-.05.075-5.223 6.608a1.2 1.2 0 01-1.867.054l-.077-.103-1.634-2.318a.5.5 0 01.76-.644l.058.068 1.64 2.328a.199.199 0 00.274.056l.029-.023.027-.03 5.229-6.616a.5.5 0 01.702-.082z"
/>
</svg>
)}
</UID>
</IconWrapper>
);
};

CheckmarkCircleIcon.displayName = 'CheckmarkCircleIcon';
export {CheckmarkCircleIcon};
3 changes: 3 additions & 0 deletions packages/paste-icons/svg/CheckmarkCircle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

1 comment on commit af76993

@vercel
Copy link

@vercel vercel bot commented on af76993 Feb 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.