Skip to content

Commit

Permalink
feat(icons): add TaskIcon and ProductCommsIcon (#3501)
Browse files Browse the repository at this point in the history
* feat(icons): add TaskIcon and ProductCommsIcon

* chore: update snapshot
  • Loading branch information
nkrantz committed Sep 21, 2023
1 parent dfff35e commit 6bc4a8a
Show file tree
Hide file tree
Showing 9 changed files with 115 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/light-buttons-type.md
@@ -0,0 +1,5 @@
---
'@twilio-paste/codemods': minor
---

[Codemods] New exports from icons package
6 changes: 6 additions & 0 deletions .changeset/ninety-actors-cross.md
@@ -0,0 +1,6 @@
---
'@twilio-paste/icons': minor
'@twilio-paste/core': minor
---

[Icons] Add new icons: ProductCommsIcon and TaskIcon
Expand Up @@ -158,6 +158,7 @@ Array [
"ProductChatIcon",
"ProductCodeExchangeCommunityIcon",
"ProductCodeExchangePartnerIcon",
"ProductCommsIcon",
"ProductConnectedDevicesIcon",
"ProductConnectionsIcon",
"ProductContactCenterAdminIcon",
Expand Down Expand Up @@ -262,6 +263,7 @@ Array [
"SuperscriptIcon",
"SupportIcon",
"SystemStatusIcon",
"TaskIcon",
"TextAlignCenterIcon",
"TextAlignJustifyIcon",
"TextAlignLeftIcon",
Expand Down
2 changes: 1 addition & 1 deletion packages/paste-icons/build.icon-list.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/paste-icons/json/icons.json

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions packages/paste-icons/src/ProductCommsIcon.tsx
@@ -0,0 +1,46 @@
/**
* This file was automatically generated with @twilio-labs/svg-to-react
*/
import * as React from 'react';
import {useUID} from '@twilio-paste/uid-library';

import {IconWrapper} from './helpers/IconWrapper';
import type {IconWrapperProps} from './helpers/IconWrapper';

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

const ProductCommsIcon = React.forwardRef<HTMLElement, ProductCommsIconProps>(
({as, display, element = 'ICON', size, color, title, decorative}, ref) => {
const titleId = `ProductCommsIcon-${useUID()}`;

if (!decorative && title == null) {
throw new Error('[ProductCommsIcon]: Missing a title for non-decorative icon.');
}

return (
<IconWrapper as={as} display={display} element={element} size={size} color={color} ref={ref}>
<svg
role="img"
aria-hidden={decorative}
width="100%"
height="100%"
viewBox="0 0 20 20"
fill="none"
aria-labelledby={titleId}
>
{title ? <title id={titleId}>{title}</title> : null}
<path
fill="currentColor"
d="M4.213 10.942c-.213.448-.88.352-.954-.139v.005L2 2.582v-.128a.52.52 0 01.443-.449h12.832c.224.027.4.198.437.422l.661 4.337h-.005a.505.505 0 01-.501.576H6.24a.496.496 0 00-.459.289l-1.568 3.313zM18 17.477v.059a.503.503 0 01-.507.464l-.032-.005H4.795a.514.514 0 01-.502-.427l-.661-4.332a.5.5 0 01.501-.577h9.627a.517.517 0 00.459-.288l1.562-3.307c.214-.443.886-.353.955.138l1.259 8.227a.208.208 0 01.005.048z"
/>
</svg>
</IconWrapper>
);
}
);

ProductCommsIcon.displayName = 'ProductCommsIcon';
export {ProductCommsIcon};
52 changes: 52 additions & 0 deletions packages/paste-icons/src/TaskIcon.tsx
@@ -0,0 +1,52 @@
/**
* This file was automatically generated with @twilio-labs/svg-to-react
*/
import * as React from 'react';
import {useUID} from '@twilio-paste/uid-library';

import {IconWrapper} from './helpers/IconWrapper';
import type {IconWrapperProps} from './helpers/IconWrapper';

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

const TaskIcon = React.forwardRef<HTMLElement, TaskIconProps>(
({as, display, element = 'ICON', size, color, title, decorative}, ref) => {
const titleId = `TaskIcon-${useUID()}`;

if (!decorative && title == null) {
throw new Error('[TaskIcon]: Missing a title for non-decorative icon.');
}

return (
<IconWrapper as={as} display={display} element={element} size={size} color={color} ref={ref}>
<svg
role="img"
aria-hidden={decorative}
width="100%"
height="100%"
viewBox="0 0 20 20"
fill="none"
aria-labelledby={titleId}
>
{title ? <title id={titleId}>{title}</title> : null}
<path
fill="currentColor"
d="M13.487 8.146a.5.5 0 010 .708L9.51 12.83a1.085 1.085 0 01-1.53 0l-1.334-1.334a.5.5 0 11.708-.707l1.332 1.334a.084.084 0 00.118 0l3.976-3.977a.5.5 0 01.707 0zM10 4.5A.75.75 0 1010 3a.75.75 0 000 1.5z"
/>
<path
fill="currentColor"
fillRule="evenodd"
clipRule="evenodd"
d="M7.867 1.94A2.923 2.923 0 0110 1c.806 0 1.573.342 2.133.94a3.23 3.23 0 01.83 1.727H15c.409 0 .793.173 1.072.47.277.296.428.69.428 1.096v11.2c0 .406-.15.8-.428 1.097A1.47 1.47 0 0115 18H5a1.47 1.47 0 01-1.072-.47 1.604 1.604 0 01-.428-1.097v-11.2c0-.405.15-.8.428-1.096A1.47 1.47 0 015 3.667h2.038a3.233 3.233 0 01.83-1.728zM10 2c-.52 0-1.025.22-1.403.623A2.26 2.26 0 008 4.167a.5.5 0 01-.5.5H5a.47.47 0 00-.342.154.604.604 0 00-.158.412v11.2c0 .16.06.308.158.413A.47.47 0 005 17h10a.47.47 0 00.342-.154.604.604 0 00.158-.413v-11.2c0-.16-.06-.308-.158-.412A.47.47 0 0015 4.667h-2.5a.5.5 0 01-.5-.5 2.26 2.26 0 00-.597-1.544A1.924 1.924 0 0010 2z"
/>
</svg>
</IconWrapper>
);
}
);

TaskIcon.displayName = 'TaskIcon';
export {TaskIcon};
1 change: 1 addition & 0 deletions packages/paste-icons/svg/ProductComms.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/paste-icons/svg/Task.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6bc4a8a

Please sign in to comment.