mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-01-19 05:45:15 +01:00
FIX: Sheet size
This commit is contained in:
parent
cb9c0044fe
commit
d51eca423d
@ -1,11 +1,12 @@
|
||||
import React, { forwardRef, useImperativeHandle, useRef } from 'react';
|
||||
import { TrueSheet, TrueSheetProps } from '@lodev09/react-native-true-sheet';
|
||||
import { SheetSize, TrueSheet, TrueSheetProps } from '@lodev09/react-native-true-sheet';
|
||||
|
||||
interface BottomModalProps extends TrueSheetProps {
|
||||
children?: React.ReactNode;
|
||||
onClose?: () => void;
|
||||
name?: string;
|
||||
isGrabberVisible?: boolean;
|
||||
sizes?: SheetSize[] | undefined;
|
||||
}
|
||||
|
||||
export interface BottomModalHandle {
|
||||
@ -14,7 +15,7 @@ export interface BottomModalHandle {
|
||||
}
|
||||
|
||||
const BottomModal = forwardRef<BottomModalHandle, BottomModalProps>(
|
||||
({ name, onClose, onPresent, onSizeChange, isGrabberVisible = true, children, ...props }, ref) => {
|
||||
({ name, onClose, onPresent, onSizeChange, isGrabberVisible = true, sizes = ['auto'], children, ...props }, ref) => {
|
||||
const trueSheetRef = useRef<TrueSheet>(null);
|
||||
|
||||
useImperativeHandle(ref, () => ({
|
||||
@ -39,12 +40,13 @@ const BottomModal = forwardRef<BottomModalHandle, BottomModalProps>(
|
||||
name={name ?? 'BottomModal'}
|
||||
ref={trueSheetRef}
|
||||
cornerRadius={24}
|
||||
sizes={['auto']}
|
||||
sizes={sizes}
|
||||
blurTint="regular"
|
||||
onDismiss={onClose}
|
||||
onPresent={onPresent}
|
||||
onSizeChange={onSizeChange}
|
||||
grabber={isGrabberVisible}
|
||||
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
|
@ -103,7 +103,7 @@ const WalletsAddMultisig = () => {
|
||||
|
||||
const renderModal = () => {
|
||||
return (
|
||||
<BottomModal ref={bottomModalRef} contentContainerStyle={styles.modalContentShort} backgroundColor={stylesHook.modalContentShort}>
|
||||
<BottomModal sizes={['auto', 'large']} ref={bottomModalRef} contentContainerStyle={styles.modalContentShort} backgroundColor={stylesHook.modalContentShort}>
|
||||
<Text style={[styles.textHeader, stylesHook.textHeader]}>{loc.multisig.quorum_header}</Text>
|
||||
<Text style={[styles.textSubtitle, stylesHook.textSubtitle]}>{loc.multisig.required_keys_out_of_total}</Text>
|
||||
<View style={styles.rowCenter}>
|
||||
|
Loading…
Reference in New Issue
Block a user