move aspect ratio to atom (#9171)
This commit is contained in:
+12
-1
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user