move styling

This commit is contained in:
Peter Holmberg 2019-01-16 13:52:38 +00:00
parent 4c40274313
commit 4c4e88910d
6 changed files with 15 additions and 2 deletions

View File

@ -16,7 +16,7 @@ const defaultProps = {
const FormField: FunctionComponent<Props> = ({ label, labelWidth, inputProps, inputWidth }) => {
return (
<div className="gf-form">
<div className="form-field">
<Label width={labelWidth}>{label}</Label>
<input type="text" className={`gf-form-input width-${inputWidth}`} {...inputProps} />
</div>

View File

@ -0,0 +1,12 @@
.form-field {
margin-bottom: $gf-form-margin;
display: flex;
flex-direction: row;
align-items: center;
text-align: left;
position: relative;
&--grow {
flex-grow: 1;
}
}

View File

@ -6,3 +6,4 @@
@import 'PanelOptionsGroup/PanelOptionsGroup';
@import 'PanelOptionsGrid/PanelOptionsGrid';
@import 'ColorPicker/ColorPicker';
@import "FormField/FormField";

View File

@ -11,7 +11,7 @@ export { default as resetSelectStyles } from './Select/resetSelectStyles';
// Forms
export { FormLabel } from './FormLabel/FormLabel';
export { FormField } from './FormGroup/FormField';
export { FormField } from './FormField/FormField';
export { Label } from './Label/Label';
export { LoadingPlaceholder } from './LoadingPlaceholder/LoadingPlaceholder';