Prepare for og tailwind use
This commit is contained in:
parent
ff6165a19b
commit
6768f15212
@ -27,11 +27,7 @@ export default function CameraImageResponse({
|
||||
}) {
|
||||
const camera = cameraFromPhoto(photos[0], cameraProp);
|
||||
return (
|
||||
<ImageContainer {...{
|
||||
width,
|
||||
height,
|
||||
...photos.length === 0 && { background: 'black' },
|
||||
}}>
|
||||
<ImageContainer solidBackground={photos.length === 0}>
|
||||
<ImagePhotoGrid
|
||||
{...{
|
||||
photos,
|
||||
|
||||
@ -24,11 +24,7 @@ export default function FilmSimulationImageResponse({
|
||||
fontFamily: string
|
||||
}) {
|
||||
return (
|
||||
<ImageContainer {...{
|
||||
width,
|
||||
height,
|
||||
...photos.length === 0 && { background: 'black' },
|
||||
}}>
|
||||
<ImageContainer solidBackground={photos.length === 0}>
|
||||
<ImagePhotoGrid
|
||||
{...{
|
||||
photos,
|
||||
|
||||
@ -20,11 +20,7 @@ export default function FocalLengthImageResponse({
|
||||
fontFamily: string
|
||||
}) {
|
||||
return (
|
||||
<ImageContainer {...{
|
||||
width,
|
||||
height,
|
||||
...photos.length === 0 && { background: 'black' },
|
||||
}}>
|
||||
<ImageContainer solidBackground={photos.length === 0}>
|
||||
<ImagePhotoGrid
|
||||
{...{
|
||||
photos,
|
||||
|
||||
@ -17,7 +17,7 @@ export default function HomeImageResponse({
|
||||
fontFamily: string
|
||||
}) {
|
||||
return (
|
||||
<ImageContainer {...{ width, height }} >
|
||||
<ImageContainer>
|
||||
<ImagePhotoGrid
|
||||
{...{
|
||||
photos,
|
||||
|
||||
@ -32,7 +32,7 @@ export default function PhotoImageResponse({
|
||||
.trim();
|
||||
|
||||
return (
|
||||
<ImageContainer {...{ width, height }}>
|
||||
<ImageContainer>
|
||||
<ImagePhotoGrid {...{
|
||||
photos: isNextImageReady ? [photo] : [],
|
||||
width,
|
||||
|
||||
@ -20,11 +20,7 @@ export default function RecipeImageResponse({
|
||||
fontFamily: string
|
||||
}) {
|
||||
return (
|
||||
<ImageContainer {...{
|
||||
width,
|
||||
height,
|
||||
...photos.length === 0 && { background: 'black' },
|
||||
}}>
|
||||
<ImageContainer solidBackground={photos.length === 0}>
|
||||
<ImagePhotoGrid
|
||||
{...{
|
||||
photos,
|
||||
|
||||
@ -20,11 +20,7 @@ export default function TagImageResponse({
|
||||
fontFamily: string
|
||||
}) {
|
||||
return (
|
||||
<ImageContainer {...{
|
||||
width,
|
||||
height,
|
||||
...photos.length === 0 && { background: 'black' },
|
||||
}}>
|
||||
<ImageContainer solidBackground={photos.length === 0}>
|
||||
<ImagePhotoGrid
|
||||
{...{
|
||||
photos,
|
||||
|
||||
@ -1,25 +1,21 @@
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
export default function ImageContainer({
|
||||
width,
|
||||
height,
|
||||
background = 'transparent',
|
||||
solidBackground,
|
||||
children,
|
||||
}: {
|
||||
width: number
|
||||
height: number
|
||||
background?: 'transparent' | 'black'
|
||||
solidBackground?: boolean
|
||||
children: ReactNode
|
||||
}) {
|
||||
return (
|
||||
<div style={{
|
||||
position: 'relative',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
background,
|
||||
width,
|
||||
height,
|
||||
backgroundColor: solidBackground ? 'black' : 'transparent',
|
||||
}}>
|
||||
{children}
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user