17782: Fixes absolute import paths from '~/somedir/...' to 'somedir/...'
[arvados-workbench2.git] / src / components / text-field / text-field.tsx
index 4788e18c51df5824608fdfc8e7793f07a1d2288a..cb908fa044a8d31e9dfb948e98bb81cacf056bc9 100644 (file)
@@ -4,7 +4,7 @@
 
 import * as React from 'react';
 import { WrappedFieldProps } from 'redux-form';
-import { ArvadosTheme } from '~/common/custom-theme';
+import { ArvadosTheme } from 'common/custom-theme';
 import {
     TextField as MaterialTextField,
     StyleRulesCallback,
@@ -15,12 +15,23 @@ import {
 import RichTextEditor from 'react-rte';
 import Margin = PropTypes.Margin;
 
-type CssRules = 'textField';
+type CssRules = 'textField' | 'rte';
 
 const styles: StyleRulesCallback<CssRules> = (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<CssRules>;
@@ -67,6 +78,7 @@ export const RichEditorTextField = withStyles(styles)(
 
         render() {
             return <RichTextEditor
+                className={this.props.classes.rte}
                 value={this.state.value}
                 onChange={this.onChange}
                 placeholder={this.props.label} />;