Skip to content

docs(Checkbox): fix isChecked description (#202) - #229

Open
Kaustubh0505 wants to merge 1 commit into
Newton-School:masterfrom
Kaustubh0505:docs/fix-checkbox-props-202
Open

docs(Checkbox): fix isChecked description (#202)#229
Kaustubh0505 wants to merge 1 commit into
Newton-School:masterfrom
Kaustubh0505:docs/fix-checkbox-props-202

Conversation

@Kaustubh0505

Copy link
Copy Markdown

Fixed the isChecked prop description to clarify it controls the current checked state as a controlled prop.

Added description for the value prop explaining its role.

Improved documentation clarity for the Checkbox component props.

Fixes #202

@MihirSachdeva
MihirSachdeva requested a review from Copilot May 22, 2025 22:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves the Checkbox component documentation by clarifying the controlled isChecked prop and (per the description) adding a value prop explanation.

  • Refines the isChecked prop comment to emphasize controlled usage.
  • (Intended) Adds documentation for the value prop.
Comments suppressed due to low confidence (2)

ui/elements/Form/Checkbox/types.ts:66

  • [nitpick] The @default false annotation may be misleading for a controlled prop. Consider clarifying what happens when isChecked is omitted or remove the default if isChecked must always be provided.
@default false

ui/elements/Form/Checkbox/types.ts:68

  • The PR description mentions adding a value prop description, but that update isn't present here. Please add a clear comment for the value prop to explain its purpose and expected usage.
isChecked?: boolean;

Comment on lines +61 to +64
* Controls the current checked state of the checkbox.
*
* This is a controlled prop. You must manage this value in the parent component,
* and update it based on user interaction via the `onChange` callback.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need not be too verbose here

Suggested change
* Controls the current checked state of the checkbox.
*
* This is a controlled prop. You must manage this value in the parent component,
* and update it based on user interaction via the `onChange` callback.
* Controls the current checked state of the checkbox.
*

@MihirSachdeva

Copy link
Copy Markdown
Member

lets update PR title to mention only about isChecked prop description, as value prop description is unchanged :)

@Kaustubh0505 Kaustubh0505 changed the title docs(Checkbox): fix isChecked and value prop descriptions (#202) docs(Checkbox): fix isChecked description (#202) May 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOCS] : fix documentation for checkbox props

3 participants