diff --git a/app/actions/actionsTypes.ts b/app/actions/actionsTypes.ts index 29c384781..f33c9ec7f 100644 --- a/app/actions/actionsTypes.ts +++ b/app/actions/actionsTypes.ts @@ -27,7 +27,6 @@ export const ROOM = createRequestTypes('ROOM', [ 'LEAVE', 'DELETE', 'REMOVED', - 'CLOSE', 'FORWARD', 'USER_TYPING' ]); diff --git a/app/actions/room.ts b/app/actions/room.ts index f0d5ed81b..168110199 100644 --- a/app/actions/room.ts +++ b/app/actions/room.ts @@ -19,7 +19,6 @@ interface IBaseReturn extends Action { type TSubscribeRoom = IBaseReturn; type TUnsubscribeRoom = IBaseReturn; -type TCloseRoom = IBaseReturn; type TRoom = Record; @@ -45,7 +44,7 @@ interface IUserTyping extends Action { status: boolean; } -export type TActionsRoom = TSubscribeRoom & TUnsubscribeRoom & TCloseRoom & ILeaveRoom & IDeleteRoom & IForwardRoom & IUserTyping; +export type TActionsRoom = TSubscribeRoom & TUnsubscribeRoom & ILeaveRoom & IDeleteRoom & IForwardRoom & IUserTyping; export function subscribeRoom(rid: string): TSubscribeRoom { return { @@ -79,13 +78,6 @@ export function deleteRoom(roomType: ERoomType, room: TRoom, selected?: ISelecte }; } -export function closeRoom(rid: string): TCloseRoom { - return { - type: ROOM.CLOSE, - rid - }; -} - export function forwardRoom(rid: string, transferData: ITransferData): IForwardRoom { return { type: ROOM.FORWARD, diff --git a/app/containers/ActionSheet/ActionSheetContentWithInputAndSubmit/index.tsx b/app/containers/ActionSheet/ActionSheetContentWithInputAndSubmit/index.tsx new file mode 100644 index 000000000..95de597f8 --- /dev/null +++ b/app/containers/ActionSheet/ActionSheetContentWithInputAndSubmit/index.tsx @@ -0,0 +1,137 @@ +import React, { useState } from 'react'; +import { StyleSheet, Text, View } from 'react-native'; + +import { CustomIcon, TIconsName } from '../../CustomIcon'; +import i18n from '../../../i18n'; +import { isIOS } from '../../../lib/methods/helpers'; +import { useTheme } from '../../../theme'; +import sharedStyles from '../../../views/Styles'; +import Button from '../../Button'; +import { FormTextInput } from '../../TextInput/FormTextInput'; +import { useActionSheet } from '../Provider'; + +const styles = StyleSheet.create({ + subtitleText: { + fontSize: 14, + ...sharedStyles.textRegular, + marginBottom: 10 + }, + buttonSeparator: { + marginRight: 8 + }, + footerButtonsContainer: { + flexDirection: 'row', + paddingTop: 16 + }, + titleContainerText: { + fontSize: 16, + ...sharedStyles.textSemibold + }, + titleContainer: { + paddingRight: 80, + marginBottom: 16, + flexDirection: 'row', + alignItems: 'center' + } +}); + +const FooterButtons = ({ + cancelAction = () => {}, + confirmAction = () => {}, + cancelTitle = '', + confirmTitle = '', + disabled = false, + cancelBackgroundColor = '', + confirmBackgroundColor = '' +}): React.ReactElement => { + const { colors } = useTheme(); + return ( + +