add initialHeight prop

This commit is contained in:
Samuel Newman
2024-10-10 16:22:07 +03:00
parent 2841944789
commit 9ac49485e2
9 changed files with 86 additions and 34 deletions
+4 -1
View File
@@ -19,6 +19,7 @@ import {
TriggerProps,
} from '#/components/Menu/types'
import {Text} from '#/components/Typography'
import {BottomSheetViewProps} from '../../../modules/bottom-sheet'
export {
type DialogControlProps as MenuControlProps,
@@ -77,9 +78,11 @@ export function Trigger({children, label}: TriggerProps) {
export function Outer({
children,
showCancel,
nativeOptions,
}: React.PropsWithChildren<{
showCancel?: boolean
style?: StyleProp<ViewStyle>
nativeOptions?: Omit<BottomSheetViewProps, 'children'>
}>) {
const context = React.useContext(Context)
const {_} = useLingui()
@@ -87,7 +90,7 @@ export function Outer({
return (
<Dialog.Outer
control={context.control}
nativeOptions={{preventExpansion: true}}>
nativeOptions={{preventExpansion: true, ...nativeOptions}}>
<Dialog.Handle />
{/* Re-wrap with context since Dialogs are portal-ed to root */}
<Context.Provider value={context}>
+1 -1
View File
@@ -386,7 +386,7 @@ let PostDropdownBtn = ({
}}
</Menu.Trigger>
<Menu.Outer>
<Menu.Outer nativeOptions={{initialHeight: 'half'}}>
{isAuthor && (
<>
<Menu.Group>