diff --git a/src/components/Footer/Address/Address.test.tsx b/src/components/Footer/Address/Address.test.tsx index 6768c93aaf..b103c3e96e 100644 --- a/src/components/Footer/Address/Address.test.tsx +++ b/src/components/Footer/Address/Address.test.tsx @@ -26,6 +26,13 @@ describe('Address component', () => { expect(getByText('thisnotfake@emailaddress.com')).toBeInTheDocument() }) + it('renders custom styles', () => { + const { container } = render( +
+ ) + expect(container.querySelector('address')).toHaveClass('custom-class') + }) + describe('renders with size prop', () => { beforeEach(() => { jest.clearAllMocks() diff --git a/src/components/Footer/Address/Address.tsx b/src/components/Footer/Address/Address.tsx index 3c43ed9c60..93da721a17 100644 --- a/src/components/Footer/Address/Address.tsx +++ b/src/components/Footer/Address/Address.tsx @@ -24,6 +24,7 @@ type AddressProps = { export const Address = ({ size, + className, big, medium, slim, @@ -42,12 +43,14 @@ export const Address = ({ const isMedium = size ? size === 'medium' : medium const isSlim = size ? size === 'slim' : slim + const addressClasses = classnames('usa-footer__address', className) + const itemClasses = classnames({ 'grid-col-auto': isBig || isMedium, 'grid-col-auto mobile-lg:grid-col-12 desktop:grid-col-auto': isSlim, }) return ( - + {isSlim ? (