From 73308af061af5e17ac7d4a73fa027a2f303c70dd Mon Sep 17 00:00:00 2001 From: Kirill Rogovoy Date: Fri, 23 Jul 2021 11:02:26 +0300 Subject: Update graph data when Emacs node changes + minor improvements --- app_expo/components/text-field/text-field.tsx | 98 --------------------------- 1 file changed, 98 deletions(-) delete mode 100644 app_expo/components/text-field/text-field.tsx (limited to 'app_expo/components/text-field/text-field.tsx') diff --git a/app_expo/components/text-field/text-field.tsx b/app_expo/components/text-field/text-field.tsx deleted file mode 100644 index 1d56b95..0000000 --- a/app_expo/components/text-field/text-field.tsx +++ /dev/null @@ -1,98 +0,0 @@ -import React from 'react' -import { StyleProp, TextInput, TextInputProps, TextStyle, View, ViewStyle } from 'react-native' -import { color, spacing, typography } from '../../theme' -import { translate, TxKeyPath } from '../../i18n' -import { Text } from '../text/text' - -// the base styling for the container -const CONTAINER: ViewStyle = { - paddingVertical: spacing[3], -} - -// the base styling for the TextInput -const INPUT: TextStyle = { - fontFamily: typography.primary, - color: color.text, - minHeight: 44, - fontSize: 18, - backgroundColor: color.palette.white, -} - -// currently we have no presets, but that changes quickly when you build your app. -const PRESETS: { [name: string]: ViewStyle } = { - default: {}, -} - -export interface TextFieldProps extends TextInputProps { - /** - * The placeholder i18n key. - */ - placeholderTx?: TxKeyPath - - /** - * The Placeholder text if no placeholderTx is provided. - */ - placeholder?: string - - /** - * The label i18n key. - */ - labelTx?: TxKeyPath - - /** - * The label text if no labelTx is provided. - */ - label?: string - - /** - * Optional container style overrides useful for margins & padding. - */ - style?: StyleProp - - /** - * Optional style overrides for the input. - */ - inputStyle?: StyleProp - - /** - * Various look & feels. - */ - preset?: keyof typeof PRESETS - - forwardedRef?: any -} - -/** - * A component which has a label and an input together. - */ -export function TextField(props: TextFieldProps) { - const { - placeholderTx, - placeholder, - labelTx, - label, - preset = 'default', - style: styleOverride, - inputStyle: inputStyleOverride, - forwardedRef, - ...rest - } = props - - const containerStyles = [CONTAINER, PRESETS[preset], styleOverride] - const inputStyles = [INPUT, inputStyleOverride] - const actualPlaceholder = placeholderTx ? translate(placeholderTx) : placeholder - - return ( - - - - - ) -} -- cgit v1.2.3