mirror of
https://github.com/Steffo99/bluelib.git
synced 2024-12-23 03:54: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,
|
"private": false,
|
||||||
"name": "bluelib",
|
"name": "bluelib",
|
||||||
"version": "0.12.0",
|
"version": "0.12.1",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"source": "src/index.js",
|
"source": "src/index.js",
|
||||||
"main": "dist/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) {
|
export default function (props) {
|
||||||
return (
|
return (
|
||||||
<label className={style.label}>
|
<label className={style.label}>
|
||||||
<div className={style.text}>{this.props.label}</div>
|
<div className={style.text}>{props.label}</div>
|
||||||
<input className={style.input} type={this.props.type} value={this.props.value}
|
<input className={style.input} type={props.type} value={props.value}
|
||||||
onChange={this.props.onChange} disabled={this.props.disabled} name={this.props.name}/>
|
onChange={props.onChange} disabled={props.disabled} name={props.name}/>
|
||||||
</label>
|
</label>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue