Skip to content

Commit a05434e

Browse files
committed
close
1 parent a71cf2e commit a05434e

4 files changed

Lines changed: 25 additions & 10 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
interface CloseIconProps {
2+
size?: number;
3+
className?: string;
4+
}
5+
6+
export function CloseIcon({ size = 32, className }: CloseIconProps) {
7+
return (
8+
<svg
9+
aria-hidden
10+
xmlns="http://www.w3.org/2000/svg"
11+
width={size}
12+
height={size}
13+
viewBox="0 0 24 24"
14+
className={className}
15+
>
16+
<path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" />
17+
</svg>
18+
);
19+
}

client/src/components/Modal/index.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import {
44
DialogPanel,
55
DialogTitle,
66
} from '@headlessui/react';
7-
import { Icon } from '@trussworks/react-uswds';
87
import { createContext, useContext } from 'react';
98
import classNames from 'classnames';
9+
import { CloseIcon } from '@components/Icons/CloseIcon';
1010

1111
type ModalContextValue = {
1212
onClose: () => void;
@@ -99,11 +99,7 @@ function ModalCloseButton() {
9999
onClick={onClose}
100100
className="absolute top-4 right-4 rounded hover:cursor-pointer"
101101
>
102-
<Icon.Close
103-
className="text-gray-500 hover:text-gray-900"
104-
size={4}
105-
aria-hidden
106-
/>
102+
<CloseIcon className="fill-gray-500 hover:fill-gray-900" />
107103
</button>
108104
);
109105
}

client/src/pages/Configurations/ConfigBuild/CodeSets/Drawer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
*/
99
import React, { useCallback, useEffect, useState } from 'react';
1010
import { FocusTrap } from 'focus-trap-react';
11-
import { Icon } from '@trussworks/react-uswds';
1211
import classNames from 'classnames';
1312
import { Search } from '@components/Search';
1413
import { Button } from '@components/Button';
14+
import { CloseIcon } from '@components/Icons/CloseIcon';
1515

1616
type DrawerProps = {
1717
title: string | React.ReactNode;
@@ -85,7 +85,7 @@ export function Drawer({
8585
onClick={handleClose}
8686
aria-label="Close drawer"
8787
>
88-
<Icon.Close size={3} aria-label="X icon indicating closure" />
88+
<CloseIcon size={24} />
8989
</Button>
9090
<section className="p-4">
9191
<h2>{title}</h2>

client/src/pages/Configurations/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ import {
3232
} from '@components/Combobox';
3333
import { Label } from '@components/Label';
3434
import { Field } from '@components/Field';
35-
import { Icon } from '@trussworks/react-uswds';
3635
import { useUpdateUserNotifications } from '../../api/app-notifications/app-notifications';
3736
import { useSearch } from '../../hooks/useSearch';
3837
import { FuseResult, FuseResultMatch, RangeTuple } from 'fuse.js';
3938
import classNames from 'classnames';
4039
import { Search } from '@components/Search';
4140
import { InfoIcon } from '@components/Icons/InfoIcon';
41+
import { CloseIcon } from '@components/Icons/CloseIcon';
4242

4343
enum ConfigurationStatus {
4444
on = 'on',
@@ -183,7 +183,7 @@ function AppUpdateBanner({
183183
variant="unstyled"
184184
className="ml-4 flex h-11 w-11 items-center justify-center rounded hover:cursor-pointer hover:opacity-75 focus:outline-none"
185185
>
186-
<Icon.Close size={3} aria-hidden className="text-blue-500" />
186+
<CloseIcon size={24} className="fill-blue-500" />
187187
</Button>
188188
</div>
189189
</div>

0 commit comments

Comments
 (0)