Is your feature request related to a problem? Please describe.
We currently have CorePhoneLink and CoreEmailLink components built with similar code in the core package. This results in code duplication. By creating a new CoreContactLink component, we can consolidate this functionality and use it for various purposes such as email, phone, SMS, etc. Additionally, we can refactor CoreEmailLink and CorePhoneLink to use CoreContactLink, thus improving code reusability and maintainability.
Describe the solution you'd like
- Create a new
CoreContactLink component that can handle different contact methods such as:
- Email
- Phone
- SMS
- Other link types
- Refactor existing components (
CorePhoneLink and CoreEmailLink) to utilize the new CoreContactLink internally.
- This will help reduce duplicate code and ensure that new contact types can be added easily by extending
CoreContactLink.
Describe alternatives you've considered
- Keep the existing
CorePhoneLink and CoreEmailLink components as they are.
- Create separate components for each new contact type (e.g., SMS, links).
- While these alternatives work, they lead to more code duplication and less flexibility compared to a unified
CoreContactLink component.
Additional context
- The
CoreContactLink component should be configurable to handle different contact types with minimal effort.
- It should include support for props such as:
variant (to specify the type: email, phone, SMS, etc.)
icon (to customize the icon for each type)
contact (the actual contact detail)
Is your feature request related to a problem? Please describe.
We currently have
CorePhoneLinkandCoreEmailLinkcomponents built with similar code in the core package. This results in code duplication. By creating a newCoreContactLinkcomponent, we can consolidate this functionality and use it for various purposes such as email, phone, SMS, etc. Additionally, we can refactorCoreEmailLinkandCorePhoneLinkto useCoreContactLink, thus improving code reusability and maintainability.Describe the solution you'd like
CoreContactLinkcomponent that can handle different contact methods such as:CorePhoneLinkandCoreEmailLink) to utilize the newCoreContactLinkinternally.CoreContactLink.Describe alternatives you've considered
CorePhoneLinkandCoreEmailLinkcomponents as they are.CoreContactLinkcomponent.Additional context
CoreContactLinkcomponent should be configurable to handle different contact types with minimal effort.variant(to specify the type: email, phone, SMS, etc.)icon(to customize the icon for each type)contact(the actual contact detail)