Skip to content

Feat: Updates LayerCard Component to be Controlled By Parent Components#107

Merged
atweedie merged 2 commits into
mainfrom
layercard-fixes
Apr 7, 2026
Merged

Feat: Updates LayerCard Component to be Controlled By Parent Components#107
atweedie merged 2 commits into
mainfrom
layercard-fixes

Conversation

@atweedie

@atweedie atweedie commented Apr 7, 2026

Copy link
Copy Markdown
Collaborator

Description

Updates the logic for the LayerCard component to no longer accept specific props which were effectively rendered as children but controlled by the component itself. Instead the component will simply render any children it is passed but will also now accept a onShowInfo prop for a function handler for clicking on the info button. This allows the parent components to control the rendering of specific children and removes the "opinionation" of the LayerCard component.

Type of change

Delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Instructions

View the LayerCard component in storybook

How Has This Been Tested?

Describe the tests that you ran to verify the changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

  • Tested within storybook
  • Tested whilst linked to another project

Checklist:

  • I have read the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated Storybook with relevant examples
  • I have made corresponding changes to the documentation
  • New and existing unit tests pass locally with my changes

@atweedie
atweedie merged commit 78c08d0 into main Apr 7, 2026
1 check passed
@atweedie
atweedie deleted the layercard-fixes branch April 7, 2026 12:58
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