File tree Expand file tree Collapse file tree 7 files changed +179
-0
lines changed
packages/base/Icons/src/Icon Expand file tree Collapse file tree 7 files changed +179
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @toptal/picasso-icons ' : minor
3+ ---
4+
5+ - added CloseCircle icon in 16px and 24px sizes
Original file line number Diff line number Diff line change 1+ import type { Ref } from 'react'
2+ import React , { forwardRef } from 'react'
3+ import type { StandardProps } from '@toptal/picasso-shared'
4+ import { twMerge } from '@toptal/picasso-tailwind-merge'
5+
6+ import { getColorClass } from './styles'
7+
8+ const BASE_SIZE = 16
9+
10+ type ScaleType = 1 | 2 | 3 | 4
11+ export interface Props extends StandardProps {
12+ scale ?: ScaleType
13+ color ?: string
14+ base ?: number
15+ classes ?: {
16+ root ?: string
17+ }
18+ }
19+ const SvgCloseCircle16 = forwardRef ( function SvgCloseCircle16 (
20+ props : Props ,
21+ ref : Ref < SVGSVGElement >
22+ ) {
23+ const {
24+ classes,
25+ className,
26+ style = { } ,
27+ color,
28+ scale,
29+ base,
30+ 'data-testid' : testId ,
31+ } = props
32+ const scaledSize = base || BASE_SIZE * Math . ceil ( scale || 1 )
33+ const svgStyle = {
34+ minWidth : `${ scaledSize } px` ,
35+ minHeight : `${ scaledSize } px` ,
36+ ...style ,
37+ }
38+
39+ return (
40+ < svg
41+ viewBox = '0 0 16 16'
42+ className = { twMerge (
43+ 'fill-current inline-block text-inherit h-[1em] align-[-.125em]' ,
44+ classes ?. root ,
45+ className ,
46+ getColorClass ( color )
47+ ) }
48+ style = { svgStyle }
49+ ref = { ref }
50+ data-testid = { testId }
51+ >
52+ < path d = 'M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16Zm0-1A7 7 0 1 1 8 1a7 7 0 0 1 0 14Zm2.5-10.207L8 7.293l-2.5-2.5-.707.707 2.5 2.5-2.5 2.5.707.707 2.5-2.5 2.5 2.5.707-.707-2.5-2.5 2.5-2.5-.707-.707Z' />
53+ </ svg >
54+ )
55+ } )
56+
57+ SvgCloseCircle16 . displayName = 'SvgCloseCircle16'
58+ export default SvgCloseCircle16
Original file line number Diff line number Diff line change 1+ import type { Ref } from 'react'
2+ import React , { forwardRef } from 'react'
3+ import type { StandardProps } from '@toptal/picasso-shared'
4+ import { twMerge } from '@toptal/picasso-tailwind-merge'
5+
6+ import { getColorClass } from './styles'
7+
8+ const BASE_SIZE = 24
9+
10+ type ScaleType = 1 | 2 | 3 | 4
11+ export interface Props extends StandardProps {
12+ scale ?: ScaleType
13+ color ?: string
14+ base ?: number
15+ classes ?: {
16+ root ?: string
17+ }
18+ }
19+ const SvgCloseCircle24 = forwardRef ( function SvgCloseCircle24 (
20+ props : Props ,
21+ ref : Ref < SVGSVGElement >
22+ ) {
23+ const {
24+ classes,
25+ className,
26+ style = { } ,
27+ color,
28+ scale,
29+ base,
30+ 'data-testid' : testId ,
31+ } = props
32+ const scaledSize = base || BASE_SIZE * Math . ceil ( scale || 1 )
33+ const svgStyle = {
34+ minWidth : `${ scaledSize } px` ,
35+ minHeight : `${ scaledSize } px` ,
36+ ...style ,
37+ }
38+
39+ return (
40+ < svg
41+ viewBox = '0 0 24 24'
42+ className = { twMerge (
43+ 'fill-current inline-block text-inherit h-[1em] align-[-.125em]' ,
44+ classes ?. root ,
45+ className ,
46+ getColorClass ( color )
47+ ) }
48+ style = { svgStyle }
49+ ref = { ref }
50+ data-testid = { testId }
51+ >
52+ < path d = 'M12 23c6.075 0 11-4.925 11-11S18.075 1 12 1 1 5.925 1 12s4.925 11 11 11Zm0-1C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10Zm4.5-15.207-4.5 4.5-4.5-4.5-.707.707 4.5 4.5-4.5 4.5.707.707 4.5-4.5 4.5 4.5.707-.707-4.5-4.5 4.5-4.5-.707-.707Z' />
53+ </ svg >
54+ )
55+ } )
56+
57+ SvgCloseCircle24 . displayName = 'SvgCloseCircle24'
58+ export default SvgCloseCircle24
Original file line number Diff line number Diff line change 1+ import { useScreens } from '@toptal/picasso-provider'
2+ import React from 'react'
3+
4+ import CloseCircle16 from './CloseCircle16'
5+ import CloseCircle24 from './CloseCircle24'
6+ import type { Props } from './CloseCircle16'
7+
8+ const CloseCircleResponsive = ( props : Props ) => {
9+ const screens = useScreens ( )
10+
11+ return screens (
12+ {
13+ xl : < CloseCircle16 { ...props } /> ,
14+ } ,
15+ < CloseCircle24 { ...props } />
16+ ) as JSX . Element
17+ }
18+
19+ export default CloseCircleResponsive
Original file line number Diff line number Diff line change @@ -96,6 +96,8 @@ export { default as ChevronRight16 } from './ChevronRight16'
9696export { default as ChevronRight24 } from './ChevronRight24'
9797export { default as Close16 } from './Close16'
9898export { default as Close24 } from './Close24'
99+ export { default as CloseCircle16 } from './CloseCircle16'
100+ export { default as CloseCircle24 } from './CloseCircle24'
99101export { default as CloseMinor16 } from './CloseMinor16'
100102export { default as CloseMinor24 } from './CloseMinor24'
101103export { default as Code16 } from './Code16'
@@ -518,6 +520,7 @@ export { default as ChevronResponsive } from './ChevronResponsive'
518520export { default as ChevronMinorResponsive } from './ChevronMinorResponsive'
519521export { default as ChevronRightResponsive } from './ChevronRightResponsive'
520522export { default as CloseResponsive } from './CloseResponsive'
523+ export { default as CloseCircleResponsive } from './CloseCircleResponsive'
521524export { default as CloseMinorResponsive } from './CloseMinorResponsive'
522525export { default as CodeResponsive } from './CodeResponsive'
523526export { default as CodeBlockResponsive } from './CodeBlockResponsive'
You can’t perform that action at this time.
0 commit comments