Skip to content
This repository was archived by the owner on May 15, 2022. It is now read-only.

Commit 6ca0fa4

Browse files
committed
Fix checkbox alignment
1 parent a30a7c8 commit 6ca0fa4

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

src/components/DatBoolean.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,13 @@ export default class DatBoolean extends Component {
5757
<span className="label-text" style={{ width: labelWidth }}>
5858
{labelText}
5959
</span>
60-
<input
61-
type="checkbox"
62-
checked={this.state.value}
63-
onChange={this.handleChange}
64-
/>
60+
<span className="checkbox-container">
61+
<input
62+
type="checkbox"
63+
checked={this.state.value}
64+
onChange={this.handleChange}
65+
/>
66+
</span>
6567
</label>
6668
</li>
6769
);

src/style/_boolean.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@
1111
padding: 5px 0;
1212
}
1313

14+
.checkbox-container {
15+
width: 100%;
16+
}
17+
1418
input[type='checkbox'] {
1519
margin: 0;
20+
vertical-align: middle;
1621
}
1722
}

0 commit comments

Comments
 (0)