css
This commit is contained in:
parent
dba5fd7795
commit
9979c00d14
|
|
@ -853,31 +853,43 @@ const SelectionBar = memo(
|
||||||
|
|
||||||
const FABButtons = memo(({ onGenAgain, handleSync }: { onGenAgain: () => void; handleSync: () => void }) => {
|
const FABButtons = memo(({ onGenAgain, handleSync }: { onGenAgain: () => void; handleSync: () => void }) => {
|
||||||
const insets = useSafeAreaInsets()
|
const insets = useSafeAreaInsets()
|
||||||
|
const buttonHeight = 56
|
||||||
|
const skewOffset = 8 // 统一所有平行四边形的倾斜角度
|
||||||
|
const padding = 2
|
||||||
|
|
||||||
|
// 计算按钮宽度:父容器宽度(screenWidth - 32)减去间距(12px)后平分
|
||||||
|
const buttonWidth = useMemo(() => (screenWidth - 16 * 2 - 12) / 2, [])
|
||||||
return (
|
return (
|
||||||
<Block className="absolute inset-x-[16px] bottom-[96px] z-40" style={{ paddingBottom: insets.bottom }}>
|
<Block className="absolute inset-x-[16px] bottom-[96px] z-40" style={{ paddingBottom: insets.bottom }}>
|
||||||
<Block className="w-full flex-row gap-[12px]">
|
<Block className="w-full flex-row gap-[12px]">
|
||||||
<Block className="flex-1 -skew-x-6 shadow-large-black">
|
<Block className="flex-1 relative" style={{ height: buttonHeight }} onClick={onGenAgain}>
|
||||||
<Block
|
<ParallelogramShape
|
||||||
className={cn`relative h-[56px] items-center justify-center overflow-hidden border-[2px] border-black bg-[#e61e25] shadow-large-accent`}
|
width={buttonWidth}
|
||||||
onClick={onGenAgain}
|
height={buttonHeight}
|
||||||
>
|
fillColor="#FFFFFF"
|
||||||
<Block className="z-10 skew-x-6 flex-row items-center gap-[8px]">
|
padding={padding}
|
||||||
<MaterialCommunityIcons color="white" name="star-four-points" size={20} />
|
skewOffset={skewOffset}
|
||||||
<Text className="font-[bol]d text-[16px] text-white">再次生成</Text>
|
>
|
||||||
</Block>
|
<Block className="absolute inset-0 z-10 flex-row items-center justify-center gap-[8px]">
|
||||||
</Block>
|
<MaterialCommunityIcons color="black" name="star-four-points" size={20} />
|
||||||
|
<Text className="font-bold text-[16px] text-black">再次生成</Text>
|
||||||
|
</Block>
|
||||||
|
</ParallelogramShape>
|
||||||
</Block>
|
</Block>
|
||||||
|
|
||||||
<Block className="flex-1 -skew-x-6 shadow-large-accent">
|
<Block className="flex-1 relative" style={{ height: buttonHeight }} onClick={handleSync}>
|
||||||
<Block
|
<ParallelogramShape
|
||||||
className={cn`relative h-[56px] items-center justify-center overflow-hidden border-[2px] border-black bg-black`}
|
width={buttonWidth}
|
||||||
onClick={handleSync}
|
height={buttonHeight}
|
||||||
>
|
fillColor="#FFE500"
|
||||||
<Block className="z-10 flex-row items-center gap-[8px]">
|
padding={padding}
|
||||||
<Ionicons color={'white'} name="refresh" size={20} />
|
skewOffset={skewOffset}
|
||||||
<Text className={cn`font-[bol]d bg-black text-[16px] text-white`}>同步</Text>
|
>
|
||||||
</Block>
|
<Block className="absolute inset-0 z-10 flex-row items-center justify-center gap-[8px]">
|
||||||
</Block>
|
<Ionicons color="black" name="refresh" size={20} />
|
||||||
|
<Text className="font-bold text-[16px] text-black">同步</Text>
|
||||||
|
</Block>
|
||||||
|
</ParallelogramShape>
|
||||||
</Block>
|
</Block>
|
||||||
</Block>
|
</Block>
|
||||||
</Block>
|
</Block>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue