Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/docs/components/radio.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Radio (spec)

# Notes

- Single radio component.
- Will contain Label.
- Will have to provide some type of prop to configure the color of the selected radio button.

| Attributes | Values | Optional ? |
| :---------- | :------: | ---------: |
| `id` | string | Yes |
| `name` | string | No |
| `value` | string | No |
| `label` | string | No |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

label should be provided as a separate component as <Label> it helps keep label and input far away and customisable layout wise

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yeah ok that makes sense. Will change it.

| `isChecked` | boolean | No |
| `onChange` | function | No |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

other props look great, can we expose more props to customize the styling aspect of the component? eg: changing the color.

Also do we need a radioGroup? as other libraries use. Any merits demerits of those?

Copy link
Copy Markdown
Author

@Ac-Srikanth Ac-Srikanth Aug 5, 2022

Choose a reason for hiding this comment

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

@pruthvi2103

  • Yeah about the color i wanted to have a discussion . Is there a mock for different color's and how much customisation should we offer in terms of color .
  • About the Radio Group there are merits and demerits as well.
    1. Since most of the cases radio will be used in a group it makes sense.Very rarely we would use a single radio button on its own.
    2. But if do have radio group we should make it robust. Like a vertical aligned radio group, or horizontal aligned radio group and all kinds of customisation.But not really sure if this is what hover is looking for now.
    3. Yes over the long term radio group will make a lot of sense.