Vercel/src/photo/image-response/components/ImageContainer.tsx
2023-09-17 19:46:07 -05:00

28 lines
470 B
TypeScript

import { ReactNode } from 'react';
export default function ImageContainer({
width,
height,
background = 'transparent',
children,
}: {
width: number
height: number
background?: 'transparent' | 'black'
children: ReactNode
}) {
return (
<div style={{
position: 'relative',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
background,
width,
height,
}}>
{children}
</div>
);
}