Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/assets/stylesheets/_uswds.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
@forward 'usa-collection';
@forward 'usa-form';
@forward 'usa-header';
@forward 'usa-icon';
@forward 'usa-layout-grid';
@forward 'usa-link';
@forward 'usa-list';
Expand Down
1 change: 0 additions & 1 deletion app/assets/stylesheets/components/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
@forward 'form';
@forward 'full-screen';
@forward 'hr';
@forward 'icon';
@forward 'language-picker';
@forward 'modal';
@forward 'nav';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@use 'uswds-core' as *;
@use '../variables/app' as *;
@use 'variables/app' as *;

@forward 'usa-icon';

$icon-min-padding: 2px;

Expand Down
9 changes: 0 additions & 9 deletions app/javascript/packages/components/button.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,4 @@ describe('Button', () => {

expect(button.classList.contains('my-button')).to.be.true();
});

it('renders icon', () => {
const { getByRole } = render(<Button icon="add">Click me</Button>);

const icon = getByRole('img', { hidden: true });

expect(icon.classList.contains('usa-icon')).to.be.true();
expect(icon.querySelector('use')!.getAttribute('href')).to.match(/#add$/);
});
});
9 changes: 0 additions & 9 deletions app/javascript/packages/components/button.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { createElement } from 'react';
import type { AnchorHTMLAttributes, ButtonHTMLAttributes, MouseEvent, ReactNode } from 'react';
import Icon from './icon';
import type { DesignSystemIcon } from './icon';

type ButtonType = 'button' | 'reset' | 'submit';

Expand Down Expand Up @@ -56,11 +54,6 @@ export interface ButtonProps {
*/
isUnstyled?: boolean;

/**
* Icon to show next to button text.
*/
icon?: DesignSystemIcon;

/**
* Optional additional class names.
*/
Expand All @@ -77,7 +70,6 @@ function Button({
isOutline,
isDisabled,
isUnstyled,
icon,
className,
...htmlAttributes
}: ButtonProps &
Expand All @@ -100,7 +92,6 @@ function Button({
return createElement(
tagName,
{ type, href, disabled: isDisabled, className: classes, ...htmlAttributes },
icon && <Icon icon={icon} />,
children,
);
}
Expand Down
26 changes: 0 additions & 26 deletions app/javascript/packages/components/icon.spec.tsx

This file was deleted.

270 changes: 0 additions & 270 deletions app/javascript/packages/components/icon.tsx

This file was deleted.

1 change: 0 additions & 1 deletion app/javascript/packages/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ export { default as Alert } from './alert';
export { default as BlockLink } from './block-link';
export { default as Button } from './button';
export { default as FullScreen } from './full-screen';
export { default as Icon } from './icon';
export { default as Link } from './link';
export { default as PageFooter } from './page-footer';
export { default as PageHeading } from './page-heading';
Expand Down