move aspect ratio to atom (#9171)

This commit is contained in:
Samuel Newman
2025-10-10 19:20:41 +03:00
committed by GitHub
parent fe31cf4508
commit 3561fc8112
12 changed files with 31 additions and 19 deletions
+12 -1
View File
@@ -1,6 +1,7 @@
import {type StyleProp, type ViewStyle} from 'react-native'
import {atoms as baseAtoms} from '@bsky.app/alf'
import {CARD_ASPECT_RATIO} from '#/lib/constants'
import {native, platform, web} from '#/alf/util/platform'
import * as Layout from '#/components/Layout'
@@ -31,6 +32,16 @@ export const atoms = {
backgroundColor: 'transparent',
},
/**
* Aspect ratios
*/
aspect_square: {
aspectRatio: 1,
},
aspect_card: {
aspectRatio: CARD_ASPECT_RATIO,
},
/*
* Transition
*/
@@ -67,7 +78,7 @@ export const atoms = {
}),
/*
* Animaations
* Animations
*/
fade_in: web({
animation: 'fadeIn ease-out 0.15s',