Skip to content

Commit

Permalink
make target area of label smaller so that empty space doesn't trigger…
Browse files Browse the repository at this point in the history
… the field focus
  • Loading branch information
beaesguerra committed Dec 11, 2024
1 parent db5c0f3 commit 79db332
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export default function LabeledField(props: Props) {
}

return (
<View style={style}>
<View style={[styles.container, style]}>
{renderLabel()}
{maybeRenderDescription()}
<Strut size={spacing.xSmall_8} />
Expand All @@ -269,6 +269,12 @@ export default function LabeledField(props: Props) {
}

const styles = StyleSheet.create({
container: {
// Prevent flex items from stretching. This prevents the label from
// being the full width so that only clicking on the label text will
// focus on the field
alignItems: "flex-start",
},
label: {
color: semanticColor.text.primary,
},
Expand Down

0 comments on commit 79db332

Please sign in to comment.