mirror of
https://github.com/Steffo99/bluelib.git
synced 2024-12-22 19:44:21 +00:00
0.12.1
This commit is contained in:
parent
9d7cbb606f
commit
dddd117dc7
4 changed files with 41 additions and 4 deletions
|
@ -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",
|
||||
|
|
16
src/components/Layout/HButton.js
Normal file
16
src/components/Layout/HButton.js
Normal 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>
|
||||
);
|
||||
}
|
21
src/components/Layout/HButton.less
Normal file
21
src/components/Layout/HButton.less
Normal 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;
|
||||
}
|
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue