Skip to content

Commit c03e9ab

Browse files
committed
Allow demo not to be centered via query param
1 parent 36adc99 commit c03e9ab

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/App.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,13 @@ function App() {
3434
body.style.backgroundColor = customColors.background || '';
3535
}
3636

37+
let classes = ['min-h-screen'];
38+
if (queryParams.get('centered') !== 'false') {
39+
classes = classes.concat(['flex', 'justify-center', 'items-center', 'p-4']);
40+
}
41+
3742
return (
38-
<div className='min-h-screen flex items-center justify-center p-4'>
43+
<div className={classes.join(' ')}>
3944
<EnumerationDemo
4045
demoType={demoType}
4146
customColors={customColors}

0 commit comments

Comments
 (0)