-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add checkbox component #204
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add checkbox example to playground please
@@ -0,0 +1,99 @@ | |||
<template> | |||
<div | |||
:class="[$style.checkbox, disabled ? $style[`checkbox--disabled`] : '', checkboxValue ? $style[`checkbox--on`] : '']" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:class="[$style.checkbox, disabled ? $style[`checkbox--disabled`] : '', checkboxValue ? $style[`checkbox--on`] : '']" | |
:class="[$style.checkbox, disabled && $style[`checkbox--disabled`], checkboxValue && $style[`checkbox--on`]]" |
<template> | ||
<div | ||
:class="[$style.checkbox, disabled ? $style[`checkbox--disabled`] : '', checkboxValue ? $style[`checkbox--on`] : '']" | ||
v-on="disabled === false ? { click: changeValue } : {}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vue has @ as v-on shortcut e.g. @click
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add checkbox to the Playground for testing
fill="none" | ||
> | ||
<path | ||
d="M5.99998 9.5L8.8823 12.6705C8.96165 12.7578 9.09892 12.7578 9.17828 12.6705L14.3333 7" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems hardcoded, is there other ways to solve it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be imported from codex the icons package
Added a new checkbox component according to the style