1
Fork 0
mirror of https://github.com/Steffo99/bluelib.git synced 2024-12-22 19:44:21 +00:00
This commit is contained in:
Steffo 2020-06-23 22:13:48 +02:00
parent 9d7cbb606f
commit dddd117dc7
Signed by: steffo
GPG key ID: 896A80F55F7C97F0
4 changed files with 41 additions and 4 deletions

View file

@ -1,7 +1,7 @@
{
"private": false,
"name": "bluelib",
"version": "0.12.0",
"version": "0.12.1",
"license": "AGPL-3.0-or-later",
"source": "src/index.js",
"main": "dist/index.js",

View file

@ -0,0 +1,16 @@
import style from './HButton.less';
export default function (props) {
return (
<label className={style.label}>
<div className={style.text}>{props.label}</div>
<button
onClick={props.disabled ? null : props.onClick}
className={style.button}
disabled={props.disabled}
>
{props.children}
</button>
</label>
);
}

View file

@ -0,0 +1,21 @@
@import "../../styles/constants.less";
.label {
width: 100%;
display: flex;
align-items: center;
margin-top: 2px;
margin-bottom: 2px;
}
.text {
flex-grow: 1;
max-width: 160px;
text-align: right;
margin-right: 4px;
}
.button {
margin-left: 4px;
flex-grow: 2;
}

View file

@ -3,9 +3,9 @@ import style from './HInput.less';
export default function (props) {
return (
<label className={style.label}>
<div className={style.text}>{this.props.label}</div>
<input className={style.input} type={this.props.type} value={this.props.value}
onChange={this.props.onChange} disabled={this.props.disabled} name={this.props.name}/>
<div className={style.text}>{props.label}</div>
<input className={style.input} type={props.type} value={props.value}
onChange={props.onChange} disabled={props.disabled} name={props.name}/>
</label>
);
}