Skip to content

Commit

Permalink
fix(html): add checkbox checked template
Browse files Browse the repository at this point in the history
  • Loading branch information
TeyaVes committed Nov 12, 2024
1 parent 9423789 commit d9f0743
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
1 change: 1 addition & 0 deletions packages/html/src/checkbox/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ export * from "./templates/checkbox-with-label-before";
export * from "./templates/checkbox-group-horizontal";
export * from "./templates/checkbox-group-normal";
export * from "./templates/checkbox-normal";
export * from "./templates/checkbox-normal-checked";
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Checkbox from "../checkbox.spec";

export const CheckboxNormalChecked = (props: any) => <Checkbox checked {...props}/>;
8 changes: 4 additions & 4 deletions packages/html/src/checkbox/tests/checkbox-rounded.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Checkbox, CheckboxNormal } from '../../checkbox';
import { Checkbox, CheckboxNormalChecked } from '../../checkbox';


const styles = `
Expand All @@ -21,15 +21,15 @@ export default () =>(
<>
<span>{rounded || 'none'}</span>
<span>
<CheckboxNormal size="small" rounded={rounded} checked />
<CheckboxNormalChecked size="small" rounded={rounded} />
checkbox
</span>
<span>
<CheckboxNormal size="medium" rounded={rounded} checked />
<CheckboxNormalChecked size="medium" rounded={rounded} />
checkbox
</span>
<span>
<CheckboxNormal size="large" rounded={rounded} checked />
<CheckboxNormalChecked size="large" rounded={rounded} />
checkbox
</span>
</>
Expand Down
14 changes: 7 additions & 7 deletions packages/html/src/checkbox/tests/checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CheckboxWithLabelAfter } from '../templates/checkbox-with-label-after';
import { CheckboxNormal } from '../templates/checkbox-normal';

import { CheckboxNormalChecked } from '../templates/checkbox-normal-checked';

const styles = `
.k-ripple-container .k-checkbox:focus::after,
Expand All @@ -24,7 +24,7 @@ export default () =>(
</div>
<div>
<label className="k-checkbox-label">
<CheckboxNormal checked />
<CheckboxNormalChecked />
Checked
</label>
</div>
Expand All @@ -33,7 +33,7 @@ export default () =>(
</div>
<div dir="rtl">
<label className="k-checkbox-label">
<CheckboxNormal checked />
<CheckboxNormalChecked />
Checked
</label>
</div>
Expand All @@ -43,7 +43,7 @@ export default () =>(
</div>
<div>
<label className="k-checkbox-label">
<CheckboxNormal disabled checked />
<CheckboxNormalChecked disabled />
Checked
</label>
</div>
Expand All @@ -52,7 +52,7 @@ export default () =>(
</div>
<div dir="rtl">
<label className="k-checkbox-label">
<CheckboxNormal disabled checked />
<CheckboxNormalChecked disabled />
Checked
</label>
</div>
Expand Down Expand Up @@ -195,7 +195,7 @@ export default () =>(
</div>
<div>
<label className="k-checkbox-label">
<CheckboxNormal checked />
<CheckboxNormalChecked />
Long label Vivamus a arcu lacus. Integer augue leo.
</label>
</div>
Expand All @@ -204,7 +204,7 @@ export default () =>(
</div>
<div dir="rtl">
<label className="k-checkbox-label">
<CheckboxNormal checked />
<CheckboxNormalChecked />
Long label Vivamus a arcu lacus. Integer augue leo.
</label>
</div>
Expand Down

0 comments on commit d9f0743

Please sign in to comment.