0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-27 20:23:08 +00:00

adjust field/checkbox styles

This commit is contained in:
Charlie Humphreys
2023-07-15 00:07:17 -05:00
parent 23f2f1f53b
commit 18c94f95f3
4 changed files with 15 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');
require('./checkbox.less');
const Checkbox = createClass({
getDefaultProps : function() {
@@ -31,8 +32,10 @@ const Checkbox = createClass({
const { text } = cm.lineInfo(n);
const id = [prefix, value, n].join('-');
return <React.Fragment>
<input type='checkbox' id={id} onChange={this.handleChange} checked={_.includes(text, `,${value}`)}/>
<label htmlFor={id}>{_.startCase(value)}</label>
<div className='widget-checkbox'>
<input type='checkbox' id={id} onChange={this.handleChange} checked={_.includes(text, `,${value}`)}/>
<label htmlFor={id}>{_.startCase(value)}</label>
</div>
</React.Fragment>;
}
});

View File

@@ -0,0 +1,7 @@
.widget-checkbox {
display: inline-block;
flex: 0 0 auto;
background-color: #ddd;
border-radius: 10px;
padding: 4px 2px;
}

View File

@@ -1,7 +1,7 @@
.widget-field {
display: inline-block;
flex: 0 0 auto;
background-color: #22d4f6;
background-color: #ddd;
border-radius: 10px;
padding: 4px 2px;
@@ -12,7 +12,7 @@
}
>input {
background-color: #22d4f6;
background-color: #ddd;
border: none;
}