-
Notifications
You must be signed in to change notification settings - Fork 16
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
Create CheckBox component aligned with design system #2838
Conversation
* fixed header * fixed styles
* new test implementation of AppButton component * updated props * changed structures for design system * fixed import * implemented story for Button * excluded stories from tests and sonar --------- Co-authored-by: YaroslavChuiko <[email protected]>
* fix: add use memo missing dependencies * fix: prevent accordion desc text overflow
Quality Gate passedIssues Measures |
|
||
type Ref = MuiButtonProps['ref'] | ||
|
||
const Button = forwardRef( |
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 generic types to forwardRef
function. So you will not have to type Ref
manually. Also props at 40-48 lines will be typed as well.
onChange={handleChange} | ||
/> | ||
)} | ||
|
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.
size = 'md', | ||
...props | ||
}) => { | ||
const [checked, setChecked] = useState(false) |
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 generic here.
It is a good practice to have generic type in useState hook, even if it has default value
add new pr |
#2702
Created Checkbox component with the following configurable props:
Default Parameters:
Color: primary
Variant: check
Size: md
Label Position: end
Loading: false
Disabled: false
Default parameters:
Color="success"
Color="error"
labelPosition="top"
labelPosition="bottom"