Skip to content

Commit 845c4b2

Browse files
committed
trying to add a wrapper around secret field to center the eye icon
increased max-height of textarea to 100px and increased padding from the right side to 40px from 36px to appear less crowded
1 parent 22b410a commit 845c4b2

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

modules/st2-auto-form/style.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,12 @@
188188
overflow-x: hidden;
189189
overflow-y: scroll;
190190

191-
padding: 9px 36px 9px 9px;
191+
padding: 9px 40px 9px 9px;
192192

193193
resize: none;
194194
cursor: text;
195195
word-wrap: break-word;
196-
max-height:50px;
196+
max-height:100px;
197197
&::-webkit-scrollbar {
198198
width: 13px;
199199
height: 13px;

modules/st2-auto-form/wrappers.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,25 @@ export class TextFieldWrapper extends React.Component {
187187
onClick: () => this.handleVisibilityToggle(),
188188
};
189189

190+
const blockProps = {
191+
className: 'st2-auto-form__wrapper-block',
192+
};
193+
190194
const line = (
191195
<div className='st2-auto-form__line'>
192196
<Label className={this.props.labelClass || 'st2-auto-form__text-field'}>
193197
<Icon name={this.props.icon} />
194198
<Title {...this.props} />
195-
{ this.props.spec && this.props.spec.secret && <Button {...buttonProps} />}
196-
{ this.props.children }
199+
{
200+
this.props.spec && this.props.spec.secret
201+
?
202+
<div {...blockProps}>
203+
<Button {...buttonProps} />
204+
{ this.props.children }
205+
</div>
206+
:
207+
this.props.children
208+
}
197209
<ErrorMessage>{ this.props.invalid }</ErrorMessage>
198210
</Label>
199211
<Description {...this.props} />

0 commit comments

Comments
 (0)