Add classes prop to ResourcePropertiesForm
authorMichal Klobukowski <michal.klobukowski@contractors.roche.com>
Wed, 28 Nov 2018 11:40:43 +0000 (12:40 +0100)
committerMichal Klobukowski <michal.klobukowski@contractors.roche.com>
Wed, 28 Nov 2018 11:40:43 +0000 (12:40 +0100)
Feature #14393

Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski@contractors.roche.com>

src/views-components/resource-properties-form/resource-properties-form.tsx

index eeddf12cfc742135f25faf98e022c651058e4e2f..a62b3d1563a8459333d7ae1be58c62ca97812256 100644 (file)
@@ -4,19 +4,22 @@
 
 import * as React from 'react';
 import { InjectedFormProps } from 'redux-form';
-import { Grid, withStyles } from '@material-ui/core';
+import { Grid, withStyles, WithStyles } from '@material-ui/core';
 import { PropertyKeyField, PROPERTY_KEY_FIELD_NAME } from './property-key-field';
 import { PropertyValueField, PROPERTY_VALUE_FIELD_NAME } from './property-value-field';
 import { ProgressButton } from '~/components/progress-button/progress-button';
+import { GridClassKey } from '@material-ui/core/Grid';
 
 export interface ResourcePropertiesFormData {
     [PROPERTY_KEY_FIELD_NAME]: string;
     [PROPERTY_VALUE_FIELD_NAME]: string;
 }
 
-export const ResourcePropertiesForm = ({ handleSubmit, submitting, invalid }: InjectedFormProps<ResourcePropertiesFormData>) =>
+export type ResourcePropertiesFormProps = InjectedFormProps<ResourcePropertiesFormData> & WithStyles<GridClassKey>;
+
+export const ResourcePropertiesForm = ({ handleSubmit, submitting, invalid, classes }: ResourcePropertiesFormProps ) =>
     <form onSubmit={handleSubmit}>
-        <Grid container spacing={16}>
+        <Grid container spacing={16} classes={classes}>
             <Grid item xs>
                 <PropertyKeyField />
             </Grid>