Skip to content

IBX-10537: Base Form Control#21

Merged
dew326 merged 3 commits intomainfrom
IBX-10537
Aug 26, 2025
Merged

IBX-10537: Base Form Control#21
dew326 merged 3 commits intomainfrom
IBX-10537

Conversation

@GrabowskiM
Copy link
Copy Markdown
Contributor

🎫 Issue IBX-10537

Related PRs:

Description:

For QA:

Documentation:

@GrabowskiM GrabowskiM requested review from a team and Copilot August 26, 2025 06:13
Copy link
Copy Markdown

Copilot AI left a comment

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 introduces a new BaseFormControl component that provides a reusable wrapper for form controls with optional label and helper text. The component serves as a foundational building block for form elements in the design system.

  • Added BaseFormControl React component with TypeScript types and proper export structure
  • Created corresponding SCSS styles for form control layout and spacing
  • Updated helper text font size from medium to small for better visual hierarchy

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/components/src/internal/partials/BaseFormControl/index.ts Export file for the BaseFormControl component and its types
packages/components/src/internal/partials/BaseFormControl/BaseFormControl.types.ts TypeScript interface definitions for BaseFormControl props
packages/components/src/internal/partials/BaseFormControl/BaseFormControl.tsx Main React component implementation with label and helper text rendering
packages/assets/src/scss/styles.scss Updated imports to include new form-control styles and reorganized helper-text import
packages/assets/src/scss/_helper-text.scss Reduced font size from medium to small for helper text
packages/assets/src/scss/_form-control.scss New SCSS file defining spacing styles for form control wrappers

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


export interface BaseFormControlProps extends BaseComponentAttributes {
children: ReactNode;
type: string;
Copy link

Copilot AI Aug 26, 2025

Choose a reason for hiding this comment

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

The type prop uses a generic string type which allows any value. Consider using a union type or enum to restrict valid form control types and improve type safety.

Suggested change
type: string;
type: 'text' | 'password' | 'email' | 'number' | 'search' | 'tel' | 'url' | 'date' | 'datetime-local' | 'month' | 'week' | 'time' | 'checkbox' | 'radio' | 'file' | 'range' | 'color' | 'hidden' | 'submit' | 'reset' | 'button';

Copilot uses AI. Check for mistakes.
@dew326 dew326 merged commit a461b87 into main Aug 26, 2025
4 checks passed
@dew326 dew326 deleted the IBX-10537 branch August 26, 2025 12:48
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.

6 participants