|
|
|
@ -9,7 +9,7 @@ import {
@@ -9,7 +9,7 @@ import {
|
|
|
|
|
} from '@/shared' |
|
|
|
|
import { PartialTheme } from '@/shared/themes/interfaces' |
|
|
|
|
import React, { FC, useState } from 'react' |
|
|
|
|
import { StyleSheet } from 'react-native' |
|
|
|
|
import { StyleSheet, View } from 'react-native' |
|
|
|
|
import { AddNewReasonSmart } from '../smart-components' |
|
|
|
|
|
|
|
|
|
interface IProps { |
|
|
|
@ -44,11 +44,10 @@ export const ReasonForm: FC<IProps> = ({
@@ -44,11 +44,10 @@ export const ReasonForm: FC<IProps> = ({
|
|
|
|
|
return ( |
|
|
|
|
<> |
|
|
|
|
{showLabel ? <Txt style={styles.blockTitle}>Підстава</Txt> : null} |
|
|
|
|
|
|
|
|
|
<View style={styles.select}> |
|
|
|
|
<FormSelect |
|
|
|
|
title={activeReason?.name || 'Оберіть зі списку'} |
|
|
|
|
buttonStyle={styles.button} |
|
|
|
|
style={!error && styles.select} |
|
|
|
|
onPress={openSelectReasonModal} |
|
|
|
|
/> |
|
|
|
|
|
|
|
|
@ -62,6 +61,7 @@ export const ReasonForm: FC<IProps> = ({
@@ -62,6 +61,7 @@ export const ReasonForm: FC<IProps> = ({
|
|
|
|
|
setNewReasonName('') |
|
|
|
|
}} |
|
|
|
|
/> |
|
|
|
|
</View> |
|
|
|
|
</> |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
@ -71,10 +71,11 @@ const createStyles = (theme: PartialTheme) =>
@@ -71,10 +71,11 @@ const createStyles = (theme: PartialTheme) =>
|
|
|
|
|
blockTitle: { |
|
|
|
|
fontSize: $size(16, 14), |
|
|
|
|
color: theme?.$secondaryText, |
|
|
|
|
marginVertical: $size(15, 13), |
|
|
|
|
marginTop: $size(15, 13), |
|
|
|
|
marginBottom: $size(10, 8), |
|
|
|
|
}, |
|
|
|
|
select: { |
|
|
|
|
marginBottom: $size(10, 8), |
|
|
|
|
marginBottom: $size(20, 18), |
|
|
|
|
}, |
|
|
|
|
button: { |
|
|
|
|
minWidth: $size(32, 28), |
|
|
|
@ -83,6 +84,7 @@ const createStyles = (theme: PartialTheme) =>
@@ -83,6 +84,7 @@ const createStyles = (theme: PartialTheme) =>
|
|
|
|
|
error: { |
|
|
|
|
color: theme?.$errorText, |
|
|
|
|
fontSize: $size(12), |
|
|
|
|
marginVertical: $size(5), |
|
|
|
|
marginTop: $size(5, 3), |
|
|
|
|
marginBottom: $size(10, 8), |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|