26 lines
503 B
TypeScript
26 lines
503 B
TypeScript
import React from 'react';
|
|
import { Box } from './Box';
|
|
|
|
interface CenterProps {
|
|
children: React.ReactNode;
|
|
fullWidth?: boolean;
|
|
fullHeight?: boolean;
|
|
}
|
|
|
|
/**
|
|
* Center - A semantic UI component for centering content.
|
|
*/
|
|
export function Center({ children, fullWidth, fullHeight }: CenterProps) {
|
|
return (
|
|
<Box
|
|
display="flex"
|
|
alignItems="center"
|
|
justifyContent="center"
|
|
fullWidth={fullWidth}
|
|
fullHeight={fullHeight}
|
|
>
|
|
{children}
|
|
</Box>
|
|
);
|
|
}
|