Skip to content

[Feat]: New Radio Group component #330

@GaroGabrielyan

Description

@GaroGabrielyan

Description: The RadioGroup component allows users to select one option from a set of mutually exclusive choices. It organizes and controls multiple Radio components, ensuring consistent spacing, alignment, and state management, while providing a unified way to handle the selection state of the group.

Requirements:

  1. Component Implementation:
  • Implement the RadioGroup component in TypeScript.
  • Utilize SCSS with BEM methodology for styling.
  • Integrate design tokens from @geneui/tokens for consistent colors, font sizes, spacing, and layout.
  • Support different states as shown in the design: Rest, Error, Disabled, and Read Only.
  • Support a Group Label and optional Helper Text or Error message.
  • Ensure full Right-to-Left (RTL) support for layout and text alignment.
  • Ensure accessibility features like ARIA attributes for grouping (role="radiogroup") and keyboard navigation.
  1. Unit Tests:
  • Write unit tests using Jest and React Testing Library.
  • Ensure test coverage for all props, including rendering of different layout types and group selections.
  • Test for edge cases such as empty groups or unsupported layout types.
  • erify that only a single selection is possible at any time.
  1. Storybook Stories:
  • Create a Storybook story for the RadioGroup component.
  • Showcase different states (Rest, Error, Disabled, Read Only) and RTL layout.
  • Create controls for the props so users can interact with the RadioGroup component in Storybook.
  • Document all props of the public interfaces.

Checklist:

  • Component is implemented in TypeScript.
  • Styling follows SCSS using BEM methodology.
  • Design tokens from @geneui/tokens are used for colors, font sizes, spacing, and layout.
  • Unit tests written and cover different states and edge cases.
  • Storybook stories created with examples of all props and layout options.
  • Figma design matches the component implementation.

Metadata

Metadata

Labels

phase / ready-to-goThis issue merged and will be included in the current milestone releasetype / featureNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions