forked from
esb.lol/alf
Bluesky's "Application Layout Framework"
1import {StyleSheet} from 'react-native'
2
3import * as common from './common'
4import {ios, isFabric} from '../platform'
5
6export const atoms = {
7 ...common.atoms,
8 fixed: {
9 position: 'absolute',
10 },
11 sticky: {},
12 overflow_auto: {},
13 flex_0: {
14 flex: 0,
15 },
16 border: {
17 borderWidth: StyleSheet.hairlineWidth,
18 },
19 border_t: {
20 borderTopWidth: StyleSheet.hairlineWidth,
21 },
22 border_b: {
23 borderBottomWidth: StyleSheet.hairlineWidth,
24 },
25 border_l: {
26 borderLeftWidth: StyleSheet.hairlineWidth,
27 },
28 border_r: {
29 borderRightWidth: StyleSheet.hairlineWidth,
30 },
31 border_x: {
32 borderLeftWidth: StyleSheet.hairlineWidth,
33 borderRightWidth: StyleSheet.hairlineWidth,
34 },
35 border_y: {
36 borderTopWidth: StyleSheet.hairlineWidth,
37 borderBottomWidth: StyleSheet.hairlineWidth,
38 },
39 border_transparent: {
40 borderColor: 'transparent',
41 },
42 curve_circular: ios({
43 borderCurve: 'circular',
44 }),
45 curve_continuous: ios({
46 borderCurve: 'continuous',
47 }),
48 shadow_sm: isFabric
49 ? {}
50 : {
51 shadowRadius: 4,
52 shadowOpacity: 0.1,
53 elevation: 8,
54 shadowOffset: {
55 width: 0,
56 height: 4,
57 },
58 },
59 shadow_md: isFabric
60 ? {}
61 : {
62 shadowRadius: 8,
63 shadowOpacity: 0.1,
64 elevation: 16,
65 shadowOffset: {
66 width: 0,
67 height: 8,
68 },
69 },
70 shadow_lg: isFabric
71 ? {}
72 : {
73 shadowRadius: 16,
74 shadowOpacity: 0.1,
75 elevation: 32,
76 shadowOffset: {
77 width: 0,
78 height: 16,
79 },
80 },
81 inline: {},
82 block: {},
83 pointer: {},
84} as const