Skip to content

Commit

Permalink
fix(html): always render checkbox-wrap around checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
joneff committed Jan 9, 2022
1 parent 00ac18d commit e623625
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/html/src/checkbox/checkbox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ function CheckboxStatic(props) {
];

return (
<input type="checkbox" className={legacyClasses} {...ariaAttr} {...htmlAttributes} />
<span className="k-checkbox-wrap"><input type="checkbox" className={legacyClasses} {...ariaAttr} {...htmlAttributes} /></span>
);
}

return (
<input type="checkbox" className={checkboxClasses} {...ariaAttr} {...htmlAttributes} />
<span className="k-checkbox-wrap"><input type="checkbox" className={checkboxClasses} {...ariaAttr} {...htmlAttributes} /></span>
);
}

Expand Down
4 changes: 2 additions & 2 deletions packages/html/src/list/list-item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function ListItemStatic(props) {
if (legacy) {
return (
<li className={legacyListItemClasses} {...ariaAttr} {...htmlAttributes}>
{showCheckbox && <span className="k-checkbox-wrap"><CheckboxStatic checked={checked} /></span>}
{showCheckbox && <CheckboxStatic checked={checked} />}
{showIcon && <IconStatic name={iconName} />}
<span className="k-list-item-text">{children}</span>
{groupLabel !== '' && <div className="k-group">{groupLabel}</div>}
Expand All @@ -71,7 +71,7 @@ function ListItemStatic(props) {

return (
<li className={listItemClasses} {...ariaAttr} {...htmlAttributes}>
{showCheckbox && <span className="k-checkbox-wrap"><CheckboxStatic checked={checked} /></span>}
{showCheckbox && <CheckboxStatic checked={checked} />}
{showIcon && <IconStatic name={iconName} />}
<span className="k-list-item-text">{children}</span>
{groupLabel !== '' && <div className="k-list-item-group-label">{groupLabel}</div>}
Expand Down
4 changes: 2 additions & 2 deletions packages/html/src/treeview/treeview-item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function TreeviewItemStatic(props) {
<li className={legacyTreeviewItemClasses} {...ariaAttr} {...htmlAttributes}>
<span className="k-mid">
{hasChildren && <span className="k-treeview-toggle"><IconStatic name={expanded ? 'collapse' : 'expand'} /></span>}
{showCheckbox && <span className="k-checkbox-wrap"><CheckboxStatic checked={checked} /></span>}
{showCheckbox && <CheckboxStatic checked={checked} />}
<TreeviewLeafStatic {...leafProps} />
</span>
{expanded && hasChildren && <TreeviewGroupStatic items={items} />}
Expand All @@ -87,7 +87,7 @@ function TreeviewItemStatic(props) {
<li className={treeviewItemClasses} {...ariaAttr} {...htmlAttributes}>
<span className="k-treeview-mid">
{hasChildren && <span className="k-treeview-toggle"><IconStatic name={expanded ? 'collapse' : 'expand'} /></span>}
{showCheckbox && <span className="k-checkbox-wrap"><CheckboxStatic checked={checked} /></span>}
{showCheckbox && <CheckboxStatic checked={checked} />}
<TreeviewLeafStatic {...leafProps} />
</span>
{expanded && hasChildren && <TreeviewGroupStatic items={items} />}
Expand Down

0 comments on commit e623625

Please sign in to comment.