Browse Source

FIX | fix reason select layout

merge-requests/236/head
MacOS 3 years ago
parent
commit
800450ff0c
  1. 4
      .gitignore
  2. 6
      .vscode/settings.json
  3. 2
      ios/Podfile.lock
  4. 42
      src/modules/tasks/components/reason-form.component.tsx
  5. 1
      src/modules/tasks/smart-components/add-new-reason.smart-component.tsx
  6. 1
      src/shared/components/forms/form-select.component.tsx

4
.gitignore vendored

@ -61,3 +61,7 @@ buck-out/ @@ -61,3 +61,7 @@ buck-out/
*/*.hprof
/android/*.hprof
# Visual Studio Code
#
.vscode/

6
.vscode/settings.json vendored

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
{
"cSpell.words": [
"Ініціатор"
]
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.formatOnPaste": true
}

2
ios/Podfile.lock

@ -562,7 +562,7 @@ SPEC CHECKSUMS: @@ -562,7 +562,7 @@ SPEC CHECKSUMS:
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: cf9b38bf0b2d048436d9a82ad2abe1404f11e7de
FBLazyVector: c71c5917ec0ad2de41d5d06a5855f6d5eda06971
FBReactNativeSpec: 50ac84ed135478e1b20e25b4c165cd57b2ce1988
FBReactNativeSpec: 1d8cb9b6fe4b85899f49b6e1f28f24709b90197e
Flipper: d3da1aa199aad94455ae725e9f3aa43f3ec17021
Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41
Flipper-Folly: 755929a4f851b2fb2c347d533a23f191b008554c

42
src/modules/tasks/components/reason-form.component.tsx

@ -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,24 +44,24 @@ export const ReasonForm: FC<IProps> = ({ @@ -44,24 +44,24 @@ export const ReasonForm: FC<IProps> = ({
return (
<>
{showLabel ? <Txt style={styles.blockTitle}>Підстава</Txt> : null}
<View style={styles.select}>
<FormSelect
title={activeReason?.name || 'Оберіть зі списку'}
buttonStyle={styles.button}
onPress={openSelectReasonModal}
/>
<FormSelect
title={activeReason?.name || 'Оберіть зі списку'}
buttonStyle={styles.button}
style={!error && styles.select}
onPress={openSelectReasonModal}
/>
{error ? <Txt style={styles.error}>{error}</Txt> : null}
{error ? <Txt style={styles.error}>{error}</Txt> : null}
<AddNewReasonSmart
reasonName={newReasonName}
onReasonNameChange={setNewReasonName}
onSubmit={() => {
submitNewReason(newReasonName)
setNewReasonName('')
}}
/>
<AddNewReasonSmart
reasonName={newReasonName}
onReasonNameChange={setNewReasonName}
onSubmit={() => {
submitNewReason(newReasonName)
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),
},
})

1
src/modules/tasks/smart-components/add-new-reason.smart-component.tsx

@ -25,7 +25,6 @@ export const AddNewReasonSmart: FC<IProps> = ({ @@ -25,7 +25,6 @@ export const AddNewReasonSmart: FC<IProps> = ({
title="Додайте нову"
icon={{ name: 'add-file', size: $size(16, 14) }}
buttonStyle={styles.button}
style={{ marginBottom: $size(20, 18) }}
onPress={() => addReasonModalSheetRef?.current?.open()}
/>

1
src/shared/components/forms/form-select.component.tsx

@ -59,6 +59,7 @@ const createStyles = (theme: PartialTheme) => @@ -59,6 +59,7 @@ const createStyles = (theme: PartialTheme) =>
container: {
height: $size(50, 45),
paddingHorizontal: $size(20, 18),
marginVertical: $size(5),
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',

Loading…
Cancel
Save