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

feat(react): allow markdown in FormLabel description, allow as prop in custom Link component #2794

Merged
merged 5 commits into from Sep 28, 2021

Conversation

karrui
Copy link
Contributor

@karrui karrui commented Sep 13, 2021

Problem

Some designs in Figma contains Form label descriptions with links. This seemed easier to achieve in markdown and thus the ability for markdown in FormLabel.Description is implemented.

See
Screenshot 2021-09-13 at 10 50 34 PM

Whilst doing so, realize the Link component cannot be re-morphed into another type using the as prop which is a common in ChakraUI. This commit was cherry picked from commit 22faa66 in #2683.

Solution

Features:

  • Add useMarkdown prop in FormLabel.Description and useMarkdownForDescription prop in the main FormLabel component to allow markdown in form label descriptions.
  • Allow as prop in custom Link component

Before & After Screenshots

New story added in Storybook for markdown in form label description.

@karrui karrui merged commit 85b84d1 into form-v2/develop Sep 28, 2021
@karrui karrui deleted the form-v2/feat/formlabel-markdown branch September 28, 2021 14:27
@justynoh justynoh mentioned this pull request Oct 5, 2022
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.

None yet

2 participants