Rename shapes to semantic meanings
It looks like after all I do want to fork based on those.
This commit is contained in:
@@ -72,7 +72,7 @@ let ProfileHeaderShell = ({
|
|||||||
height: 1000,
|
height: 1000,
|
||||||
width: 1000,
|
width: 1000,
|
||||||
},
|
},
|
||||||
shape: 'circle',
|
type: 'circle-avi',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
index: 0,
|
index: 0,
|
||||||
|
|||||||
@@ -24,5 +24,5 @@ export type ImageSource = {
|
|||||||
thumbRect: MeasuredDimensions | null
|
thumbRect: MeasuredDimensions | null
|
||||||
alt?: string
|
alt?: string
|
||||||
dimensions: Dimensions | null
|
dimensions: Dimensions | null
|
||||||
shape: 'circle' | 'rect' | 'rounded-rect'
|
type: 'image' | 'circle-avi' | 'rect-avi'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -309,9 +309,9 @@ const ImageItem = ({
|
|||||||
width: SCREEN.width,
|
width: SCREEN.width,
|
||||||
height: imageAspect ? SCREEN.width / imageAspect : undefined,
|
height: imageAspect ? SCREEN.width / imageAspect : undefined,
|
||||||
borderRadius:
|
borderRadius:
|
||||||
imageSrc.shape === 'circle'
|
imageSrc.type === 'circle-avi'
|
||||||
? SCREEN.width / 2
|
? SCREEN.width / 2
|
||||||
: imageSrc.shape === 'rounded-rect'
|
: imageSrc.type === 'rect-avi'
|
||||||
? 20
|
? 20
|
||||||
: 0,
|
: 0,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -138,9 +138,9 @@ const ImageItem = ({
|
|||||||
width: SCREEN.width,
|
width: SCREEN.width,
|
||||||
height: imageAspect ? SCREEN.width / imageAspect : undefined,
|
height: imageAspect ? SCREEN.width / imageAspect : undefined,
|
||||||
borderRadius:
|
borderRadius:
|
||||||
imageSrc.shape === 'circle'
|
imageSrc.type === 'circle-avi'
|
||||||
? SCREEN.width / 2
|
? SCREEN.width / 2
|
||||||
: imageSrc.shape === 'rounded-rect'
|
: imageSrc.type === 'rect-avi'
|
||||||
? 20
|
? 20
|
||||||
: 0,
|
: 0,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ export function ProfileSubpageHeader({
|
|||||||
height: 1000,
|
height: 1000,
|
||||||
width: 1000,
|
width: 1000,
|
||||||
},
|
},
|
||||||
shape: 'rounded-rect',
|
type: 'rect-avi',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
index: 0,
|
index: 0,
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ export function PostEmbeds({
|
|||||||
images: items.map((item, i) => ({
|
images: items.map((item, i) => ({
|
||||||
...item,
|
...item,
|
||||||
thumbRect: thumbRects[i] ?? null,
|
thumbRect: thumbRects[i] ?? null,
|
||||||
shape: 'rect',
|
type: 'image',
|
||||||
})),
|
})),
|
||||||
index,
|
index,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user