Skip to content

Add accordion content gap#435

Open
aadi704 wants to merge 1 commit into
stagingfrom
accordion-gap
Open

Add accordion content gap#435
aadi704 wants to merge 1 commit into
stagingfrom
accordion-gap

Conversation

@aadi704
Copy link
Copy Markdown

@aadi704 aadi704 commented Apr 13, 2026

Summary

  • added the missing 12px gap inside accordion content to match the updated Figma spacing
  • updated the content wrapper in src/components/accordion/accordion.tsx to stack children with gap-3

What Changed

  • changed the inner accordion content container from a plain wrapper to a vertical flex container
  • applied gap-3 which maps to 12px
  • kept the existing padding behavior for simple, separator, and boxed accordion types

Validation

  • reviewed the generated diff to confirm the change is isolated to the accordion content wrapper
  • full typecheck could not be run in this workspace because local dependencies are not installed

Comment thread src/components/accordion/accordion.tsx Outdated
@@ -310,7 +310,9 @@ export const AccordionContent = ( {
aria-labelledby={ triggerId }
aria-hidden={ ! isOpen }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What: Consider adding type checks or validations for the children prop being passed to the AccordionContent component.

Why: While it may not directly introduce a vulnerability, ensuring that children is the right type helps prevent runtime errors and unexpected behavior, which enhances the component's robustness.

How: You could implement prop-types for type checking or use TypeScript interfaces to ensure that the children are of an acceptable type (e.g., ReactNode). This way, you can catch potential errors earlier.

Comment thread src/components/accordion/accordion.tsx Outdated
@@ -310,7 +310,9 @@ export const AccordionContent = ( {
aria-labelledby={ triggerId }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What: The addition of the gap-3 class and the overall change to a flex container looks good for layout purposes, but ensure that these styles are consistent across all uses of the accordion component.

Why: Inconsistent styling across different parts of your application can lead to a poor user experience. Ensuring consistent spacing will improve the visual coherence of the UI.

How: You might want to check similar components or blocks to see if they adhere to the same spacing and layout rules established in this PR. Consider creating centralized style definitions if they are not already in place.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Great job! ✅ The PR looks solid with no security or performance issues.

Please make sure to resolve any remaining comments if any. Approved 👍

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.

1 participant