Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(card): deprecate linkProperties on the Card Component #1365

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vgeorge
Copy link
Contributor

@vgeorge vgeorge commented Jan 9, 2025

Related Ticket: #1344

Description of Changes

  • Replace all links in the Card with the Link component from Veda UI provider
  • Updated type definitions to ensure to and onClick cannot be present simultaneously
  • Added JSDoc comments
  • Included a warning for deprecated props linkTo and linkProperties
  • Handled non-interactive card case where neither to nor onClick is provided

Notes & Questions About Changes

The main focus of this change was to use the new Link component from the provider but to keep backwards compatibility with existing implementations.

Validation / Testing

I suggest visiting E&A and Stories page and confirm the previous behaviour hasn't changed. Another thing is to check if a lint warning is shown when trying to using to and onClick properties at the same time on a Card component.

This is ready for a review.

- Updated type definitions to ensure `to` and `onClick` cannot be present simultaneously
- Added JSDoc comments for better documentation and clarity
- Included a warning for deprecated props `linkTo` and `linkProperties`
- Handled non-interactive card case where neither `to` nor `onClick` is provided
Copy link

netlify bot commented Jan 9, 2025

Deploy Preview for veda-ui ready!

Name Link
🔨 Latest commit 448f315
🔍 Latest deploy log https://app.netlify.com/sites/veda-ui/deploys/677fc9bc404ab40008b8c554
😎 Deploy Preview https://deploy-preview-1365--veda-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

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