From 40579c3e0c35691bc9eb06c61537464dce3b25d3 Mon Sep 17 00:00:00 2001 From: orangemug Date: Wed, 10 Jun 2020 10:59:44 +0100 Subject: [PATCH] Added back in action buttons to input label/fieldset --- src/components/Block.jsx | 3 +++ src/components/Fieldset.jsx | 7 ++++++- src/components/SpecField.jsx | 2 +- src/styles/_components.scss | 12 +++++++++++- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/components/Block.jsx b/src/components/Block.jsx index 878d98f..bf754c5 100644 --- a/src/components/Block.jsx +++ b/src/components/Block.jsx @@ -72,6 +72,9 @@ export default class Block extends React.Component {
{this.props.label}
+
+ {this.props.action} +
this._blockEl = el}> {this.props.children}
diff --git a/src/components/Fieldset.jsx b/src/components/Fieldset.jsx index 4b7cada..aa3b23e 100644 --- a/src/components/Fieldset.jsx +++ b/src/components/Fieldset.jsx @@ -14,7 +14,12 @@ export default class Fieldset extends React.Component { const {props} = this; return
-
{props.label}
+
+ {props.label} +
+
+ {this.props.action} +
{props.children}
diff --git a/src/components/SpecField.jsx b/src/components/SpecField.jsx index 45be8a2..3b4dfcc 100644 --- a/src/components/SpecField.jsx +++ b/src/components/SpecField.jsx @@ -33,7 +33,7 @@ export default class SpecField extends React.Component { TypeBlock = Block; } - return + return } diff --git a/src/styles/_components.scss b/src/styles/_components.scss index d86896b..3a04689 100644 --- a/src/styles/_components.scss +++ b/src/styles/_components.scss @@ -168,11 +168,21 @@ color: $color-lowgray; display: inline-block; user-select: none; - width: 50%; + width: 32%; vertical-align: top; font-size: 12px; } + &-action { + color: $color-lowgray; + display: inline-block; + user-select: none; + width: 18%; + vertical-align: top; + font-size: 12px; + text-align: right; + } + &-content { display: inline-block; width: 50%;