Skip to content

Commit

Permalink
make rounded background its own component, use it in engage with us
Browse files Browse the repository at this point in the history
  • Loading branch information
jakewheeler committed Dec 9, 2024
1 parent b8b87f2 commit d135526
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 24 deletions.
23 changes: 23 additions & 0 deletions src/app/components/RoundedBackground/RoundedBackground.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import classNames from 'classnames';

interface RoundedBackgroundProps extends React.ComponentProps<'div'> {
children: React.ReactNode;
}

export const RoundedBackground = ({
children,
className,
...props
}: RoundedBackgroundProps) => {
return (
<div
{...props}
className={classNames(
'rounded-br-[2.5rem] rounded-tl-[2.5rem] border-2 border-[#82b4c9] bg-white/50',
className,
)}
>
{children}
</div>
);
};
26 changes: 2 additions & 24 deletions src/app/engage-with-us/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from '@trussworks/react-uswds';
import { ContentContainer } from '../components/ContentContainer/ContentContainer';
import { useHeroInit } from '../hooks/useHeroInit';
import classNames from 'classnames';
import { RoundedBackground } from '../components/RoundedBackground/RoundedBackground';

const EngageWithUs = () => {
useHeroInit({
Expand Down Expand Up @@ -39,7 +39,7 @@ const EngageWithUs = () => {
</div>
</ContentContainer>
);
}
};

const Left = () => {
return (
Expand Down Expand Up @@ -121,28 +121,6 @@ const Left = () => {
</Button>
</div>
);
}

interface RoundedBackgroundProps extends React.ComponentProps<'div'> {
children: React.ReactNode;
}

const RoundedBackground = ({
children,
className,
...props
}: RoundedBackgroundProps) => {
return (
<div
{...props}
className={classNames(
'rounded-br-[2.5rem] rounded-tl-[2.5rem] border-2 border-[#82b4c9] bg-white/50',
className,
)}
>
{children}
</div>
);
};

const Right = () => {
Expand Down

0 comments on commit d135526

Please sign in to comment.