feat(link-button): add LinkButtonPreview component#664
Open
Conversation
There was a problem hiding this comment.
Code Review
This pull request replaces static code examples and the live editor in the LinkButton documentation with a new LinkButtonPreview component, updating both German and English MDX files and adding necessary translation keys. The feedback suggests adding a character limit to the _accessKey property in the preview component to ensure consistency with the _shortKey property.
| _disabled: <BooleanProperty label="Disabled" />, | ||
| _hideLabel: <BooleanProperty label="Hide Label" />, | ||
| _download: <KolInputText _label="Download" />, | ||
| _accessKey: <KolInputText _label="Access Key" />, |
There was a problem hiding this comment.
For consistency with the _shortKey property and to ensure only a single character is entered, it is recommended to add _maxLength={1} to the _accessKey input component.
Suggested change
| _accessKey: <KolInputText _label="Access Key" />, | |
| _accessKey: <KolInputText _label="Access Key" _maxLength={1} />, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors the documentation for the
LinkButtoncomponent in both German and English, replacing static code examples and live editors with a new interactive preview component. It also introduces theLinkButtonPreviewReact component and updates localization files to support it.Documentation improvements:
docs/30-components/link-button.mdx(German) andi18n/en/docusaurus-plugin-content-docs/current/30-components/link-button.mdx(English) with the new<LinkButtonPreview />component for a more interactive and maintainable experience. [1] [2] [3] [4] [5] [6]Component additions:
src/components/previews/components/LinkButton.tsx, which implements theLinkButtonPreviewReact component for rendering interactive previews of theLinkButtonwith configurable properties.Localization updates:
i18n/de/code.json) and English (i18n/en/code.json) localization files to add labels and hrefs used by the new preview component. [1] [2]