Skip to content
This repository was archived by the owner on Mar 25, 2023. It is now read-only.

Commit a5bce52

Browse files
onpawsmilesrichardson
authored andcommitted
Introduce a simple close icon <IconClose>
1 parent 1a9bc3e commit a5bce52

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

tdesign/src/Icon/IconClose.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// @jsx jsx
2+
// @ts-ignore
3+
import { jsx } from 'theme-ui';
4+
import * as React from 'react';
5+
6+
import { closeIconURI } from './cssSvgStrings';
7+
import BaseIcon, { IIconProps } from './BaseIcon';
8+
9+
export default (props: IIconProps) => {
10+
return <BaseIcon iconSlug={'close'} svgURI={closeIconURI} {...props} />;
11+
};
12+

tdesign/src/Icon/cssSvgStrings.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ export const chevronsUpIconURI =
4848
"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-chevrons-up'%3E%3Cpolyline points='17 11 12 6 7 11'%3E%3C/polyline%3E%3Cpolyline points='17 18 12 13 7 18'%3E%3C/polyline%3E%3C/svg%3E";
4949
export const clipboardIconURI =
5050
"data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-clipboard'%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'%3E%3C/path%3E%3Crect x='8' y='2' width='8' height='4' rx='1' ry='1'%3E%3C/rect%3E%3C/svg%3E";
51+
export const closeIconURI =
52+
"data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='UTF-8'?%3E%3Csvg width='24px' height='24px' viewBox='0 0 24 24' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Ctitle%3ECombined Shape%3C/title%3E%3Cg id='closeIcon' stroke='none' stroke-width='1' fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M24.1060756,1.10821385 C24.6518512,1.6521646 24.6533305,2.53556234 24.1093798,3.08133793 C24.1069508,3.08377499 24.1045129,3.08620306 24.1020661,3.08862208 L14.3720349,12.7071495 L24.1020661,22.3254566 C24.6500397,22.8671929 24.6550961,23.7505775 24.1133597,24.2985511 L24.1060756,24.3058648 C23.5550597,24.8550383 22.6641962,24.856842 22.1109611,24.3099041 L12.3730349,14.6831495 L2.6364509,24.3099041 C2.08321584,24.856842 1.19235228,24.8550383 0.641336415,24.3058648 C0.0955608241,23.7619141 0.0940814993,22.8785163 0.63803225,22.3327407 C0.640461161,22.3303037 0.642899078,22.3278756 0.645345952,22.3254566 L10.3740349,12.7071495 L0.645345952,3.08862208 C0.0973722776,2.54688573 0.0923159233,1.66350122 0.634052268,1.11552755 C0.63647129,1.11308068 0.638899356,1.11064276 0.641336415,1.10821385 C1.19235228,0.559040344 2.08321584,0.5572367 2.6364509,1.10417454 L12.3730349,10.7301495 L22.1109611,1.10417454 C22.6641962,0.5572367 23.5550597,0.559040344 24.1060756,1.10821385 Z' fill='currentColor'%3E%3C/path%3E%3C/g%3E%3C/svg%3E";
5153
export const columnsIconURI =
5254
"data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-columns'%3E%3Cpath d='M12 3h7a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-7m0-18H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7m0-18v18'%3E%3C/path%3E%3C/svg%3E";
5355
export const composeImagesIconURI =

tdesign/src/Icon/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,3 +298,6 @@ export { IconThreeDotsHorizontal };
298298
import IconHamburger from './IconHamburger';
299299
export { IconHamburger };
300300

301+
302+
import IconClose from './IconClose';
303+
export { IconClose };

0 commit comments

Comments
 (0)