File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
static/app/components/core/form/layout Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 11import { FieldMeta } from '@sentry/scraps/form/field/meta' ;
22import { useFieldContext } from '@sentry/scraps/form/formContext' ;
3- import { Container , Flex , Stack } from '@sentry/scraps/layout' ;
3+ import { Container , Flex , Stack , type FlexProps } from '@sentry/scraps/layout' ;
44
55interface LayoutProps {
66 children : React . ReactNode ;
77 label : React . ReactNode ;
88 hintText ?: React . ReactNode ;
9+ padding ?: FlexProps < 'div' > [ 'padding' ] ;
910 required ?: boolean ;
1011 variant ?: 'compact' ;
1112}
@@ -15,7 +16,13 @@ function RowLayout(props: LayoutProps) {
1516 const field = useFieldContext ( ) ;
1617
1718 return (
18- < Flex id = { field . name } gap = "sm" align = "center" justify = "between" >
19+ < Flex
20+ id = { field . name }
21+ gap = "sm"
22+ align = "center"
23+ justify = "between"
24+ padding = { props . padding }
25+ >
1926 < Stack width = "50%" gap = "xs" >
2027 < Flex gap = "xs" align = "center" >
2128 < FieldMeta . Label
@@ -40,7 +47,7 @@ function StackLayout(props: LayoutProps) {
4047 const field = useFieldContext ( ) ;
4148
4249 return (
43- < Stack id = { field . name } gap = "md" >
50+ < Stack id = { field . name } gap = "md" padding = { props . padding } >
4451 < Flex gap = "xs" align = "center" >
4552 < FieldMeta . Label
4653 required = { props . required }
You can’t perform that action at this time.
0 commit comments