@bigbinary/neetoui-rn 3.1.0 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -144,10 +144,10 @@ export const Alert = () => {
|
|
|
144
144
|
variant={primary.variant ?? "solid"}
|
|
145
145
|
onPress={() => handleButtonPress(primary)}
|
|
146
146
|
/>
|
|
147
|
-
{secondary.map(button => (
|
|
147
|
+
{secondary.map((button, index) => (
|
|
148
148
|
<Pressable
|
|
149
149
|
accessibilityRole="button"
|
|
150
|
-
key={
|
|
150
|
+
key={index}
|
|
151
151
|
style={styles.secondaryButton}
|
|
152
152
|
onPress={() => handleButtonPress(button)}
|
|
153
153
|
>
|
|
@@ -194,7 +194,11 @@ const styles = StyleSheet.create((theme, rt) => {
|
|
|
194
194
|
width: moderateScale(40),
|
|
195
195
|
},
|
|
196
196
|
content: {
|
|
197
|
-
|
|
197
|
+
// The sheet sits flush against the bottom of the screen, and gorhom
|
|
198
|
+
// adds no safe-area padding of its own. Without the inset, Android's
|
|
199
|
+
// navigation bar covers the last row of the sheet — which is the
|
|
200
|
+
// secondary button ("Cancel") whenever the alert has more than one.
|
|
201
|
+
paddingBottom: moderateScale(24) + rt.insets.bottom,
|
|
198
202
|
},
|
|
199
203
|
titleContainer: {
|
|
200
204
|
borderBottomColor: theme.colors.palette.grey200,
|
|
@@ -126,6 +126,14 @@ const styles = StyleSheet.create((theme, rt) => {
|
|
|
126
126
|
color: theme.colors.text.primary,
|
|
127
127
|
fontFamily: theme.fonts.regular,
|
|
128
128
|
fontSize: theme.fontSizes.m,
|
|
129
|
+
// Android measures the composer from the typeface's glyph bbox (first
|
|
130
|
+
// and last line) but lays the text out from the hhea ascent +
|
|
131
|
+
// descent. SF Pro Text's bbox is the shorter of the two, so once the
|
|
132
|
+
// composer grows past minHeight it comes out ~3dp shorter than its
|
|
133
|
+
// own text: scrollable by that slack, last line's descenders clipped.
|
|
134
|
+
// Sizing from ascent + descent on both sides removes it; iOS ignores
|
|
135
|
+
// the flag.
|
|
136
|
+
includeFontPadding: false,
|
|
129
137
|
minHeight: moderateScale(50),
|
|
130
138
|
padding: 0,
|
|
131
139
|
},
|
|
@@ -151,6 +151,13 @@ const styles = StyleSheet.create(theme => ({
|
|
|
151
151
|
// 17 is what v2 typed at, and it is what the resting label shrinks
|
|
152
152
|
// from: any other size makes the label jump rather than lift.
|
|
153
153
|
fontSize: theme.fontSizes.xl,
|
|
154
|
+
// Android measures a single-line field from the typeface's glyph bbox
|
|
155
|
+
// but lays its text out from the hhea ascent + descent. SF Pro Text's
|
|
156
|
+
// bbox is the shorter of the two, so the field came out ~3dp shorter
|
|
157
|
+
// than its own line and the text could be dragged up and down inside
|
|
158
|
+
// it. Sizing from ascent + descent on both sides removes the slack;
|
|
159
|
+
// iOS ignores the flag.
|
|
160
|
+
includeFontPadding: false,
|
|
154
161
|
// Android's EditText brings its own padding, which would stack on top
|
|
155
162
|
// of the box's and make the field taller on one platform only.
|
|
156
163
|
padding: 0,
|
|
@@ -119,6 +119,13 @@ const styles = StyleSheet.create((theme, rt) => {
|
|
|
119
119
|
flex: 1,
|
|
120
120
|
fontFamily: theme.fonts.regular,
|
|
121
121
|
fontSize: moderateScale(16),
|
|
122
|
+
// Android measures a single-line field from the typeface's glyph bbox
|
|
123
|
+
// but lays its text out from the hhea ascent + descent. SF Pro Text's
|
|
124
|
+
// bbox is the shorter of the two, so the field came out ~3dp shorter
|
|
125
|
+
// than its own line and the text could be dragged up and down inside
|
|
126
|
+
// it. Sizing from ascent + descent on both sides removes the slack;
|
|
127
|
+
// iOS ignores the flag.
|
|
128
|
+
includeFontPadding: false,
|
|
122
129
|
padding: 0,
|
|
123
130
|
},
|
|
124
131
|
cancelButton: {
|