@@ -94,20 +94,18 @@ export class Checkbox implements ControlValueAccessor, AfterViewInit {
9494 */
9595 static checkboxCount = 0 ;
9696
97- @HostBinding ( "attr.class" ) class = "bx--checkbox-wrapper" ;
98-
9997 /**
10098 * Size of the checkbox.
10199 */
102100 @Input ( ) size : "sm" | "md" = "md" ;
103- /**
104- * Set to `true` for checkbox to be rendered with inline styles.
105- */
106- @Input ( ) inline : boolean ;
107101 /**
108102 * Set to `true` for checkbox to be rendered with nested styles.
109103 */
110104 @Input ( ) nested : boolean ;
105+ /**
106+ * Set to `true` for checkbox to be rendered without any classes on the host element.
107+ */
108+ @Input ( ) inline = false ;
111109 /**
112110 * Set to `true` for a disabled checkbox.
113111 */
@@ -190,6 +188,13 @@ export class Checkbox implements ControlValueAccessor, AfterViewInit {
190188 }
191189 }
192190
191+ @HostBinding ( "class.bx--checkbox-wrapper" ) get checkboxWrapperClass ( ) {
192+ return ! this . inline ;
193+ }
194+ @HostBinding ( "class.bx--form-item" ) get formItemClass ( ) {
195+ return ! this . inline ;
196+ }
197+
193198 /**
194199 * Emits event notifying other classes when a change in state occurs on a checkbox after a
195200 * click.
@@ -226,18 +231,6 @@ export class Checkbox implements ControlValueAccessor, AfterViewInit {
226231 Checkbox . checkboxCount ++ ;
227232 }
228233
229- /**
230- * Creates a class name based on `@Input() size`, `@Input() inline`, and `@Input() nested`.
231- * @return {string }
232- */
233- public getVariantClass ( ) {
234- if ( this . inline || this . nested ) {
235- return `checkbox${ this . inline ? "--inline" : "" } ${ this . nested ? "--nested" : "" } ${ this . size !== "md" ? `-${ this . size } ` : "" } ` ;
236- } else {
237- return `checkbox${ this . size !== "md" ? `--${ this . size } ` : "" } ` ;
238- }
239- }
240-
241234 /**
242235 * Toggle the selected state of the checkbox.
243236 * @memberof Checkbox
0 commit comments