X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/91805762d03955bc2b34804eecb9c6ee775b2528..3c7e3cdc547ad5468421e1c049daa94b0d4b8bc0:/src/components/text-field/text-field.tsx diff --git a/src/components/text-field/text-field.tsx b/src/components/text-field/text-field.tsx index dd864a93..09fa2dd8 100644 --- a/src/components/text-field/text-field.tsx +++ b/src/components/text-field/text-field.tsx @@ -2,33 +2,59 @@ // // SPDX-License-Identifier: AGPL-3.0 -import * as React from 'react'; +import React from 'react'; import { WrappedFieldProps } from 'redux-form'; -import { ArvadosTheme } from '~/common/custom-theme'; -import { TextField as MaterialTextField, StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core'; +import { ArvadosTheme } from 'common/custom-theme'; +import { + TextField as MaterialTextField, + StyleRulesCallback, + WithStyles, + withStyles, + PropTypes +} from '@material-ui/core'; import RichTextEditor from 'react-rte'; +import Margin from 'PropTypes'; -type CssRules = 'textField'; +type CssRules = 'textField' | 'rte'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ textField: { - marginBottom: theme.spacing.unit * 3 + marginBottom: theme.spacing.unit }, + rte: { + fontFamily: 'Arial', + '& a': { + textDecoration: 'none', + color: theme.palette.primary.main, + '&:hover': { + cursor: 'pointer', + textDecoration: 'underline' + } + } + } }); type TextFieldProps = WrappedFieldProps & WithStyles; -export const TextField = withStyles(styles)((props: TextFieldProps & { label?: string, autoFocus?: boolean, required?: boolean }) => +export const TextField = withStyles(styles)((props: TextFieldProps & { + label?: string, autoFocus?: boolean, required?: boolean, select?: boolean, disabled?: boolean, children: React.ReactNode, margin?: Margin, placeholder?: string, + helperText?: string, type?: string, +}) => ); @@ -51,7 +77,8 @@ export const RichEditorTextField = withStyles(styles)( } render() { - return ; @@ -60,7 +87,7 @@ export const RichEditorTextField = withStyles(styles)( ); export const DateTextField = withStyles(styles) - ((props: TextFieldProps) => + ((props: TextFieldProps) => - ); \ No newline at end of file + /> + );