feat(LongTextTooltip): Added LongTextTooltip component.#41
Merged
fhlavac merged 5 commits intopatternfly:mainfrom Oct 3, 2023
Merged
feat(LongTextTooltip): Added LongTextTooltip component.#41fhlavac merged 5 commits intopatternfly:mainfrom
fhlavac merged 5 commits intopatternfly:mainfrom
Conversation
Contributor
692f2ba to
99fba75
Compare
fhlavac
reviewed
Oct 3, 2023
| @@ -0,0 +1,3 @@ | |||
| export { default } from './LongTextTooltip'; | |||
| export { default as LongTextTooltip } from './LongTextTooltip'; | |||
Contributor
There was a problem hiding this comment.
we should not provide a named export for the component, just a default one
fhlavac
reviewed
Oct 3, 2023
...ternfly-docs/content/extensions/component-groups/examples/LongTextTooltip/LongTextTooltip.md
Outdated
Show resolved
Hide resolved
…roups/examples/LongTextTooltip/LongTextTooltip.md Co-authored-by: Filip Hlavac <50696716+fhlavac@users.noreply.github.com>
fhlavac
approved these changes
Oct 3, 2023
|
🎉 This PR is included in version 1.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
edonehoo
reviewed
Oct 3, 2023
Comment on lines
+1
to
+17
| --- | ||
| section: extensions | ||
| subsection: Component groups | ||
| id: Long text tooltip | ||
| source: react | ||
| propComponents: ['LongTextTooltip'] | ||
| --- | ||
|
|
||
| import LongTextTooltip from "@patternfly/react-component-groups/dist/dynamic/LongTextTooltip"; | ||
|
|
||
| The **long text tooltip** component is a tooltip that can be used to display long text to users. It uses the `Tooltip` component to display the truncated text passed in as `content`. It uses `maxLength` prop to control the size of the content, and the `Tooltip` component to display the rest of the content. | ||
|
|
||
| ## Examples | ||
|
|
||
| ### LongTextTooltip component | ||
|
|
||
| To provide users with long text, a basic long text tooltip should contain an appropriate and informative `content` and `maxLength`. Additionally you can pass in a `tooltipPosition` to control the position of the tooltip, and `tooltipMaxWidth` to control the tool tip width. |
Collaborator
There was a problem hiding this comment.
---
section: extensions
subsection: Component groups
id: Long-text tooltip
source: react
propComponents: ['LongTextTooltip']
---
import LongTextTooltip from "@patternfly/react-component-groups/dist/dynamic/LongTextTooltip";
The **long-text tooltip** component enables you to display long text to users via a tooltip. It builds off of the [tooltip component](/components/tooltip) to truncate UI text in an element and display the truncated text in a tooltip.
## Examples
### Basic long-text tooltip
To show users the full value of truncated content , a basic long-text tooltip should contain appropriate and informative `content` and specify the `maxLength` of the UI text (after which, truncation will occur).
Additionally you can pass in a `tooltipPosition` to control the position of the tooltip, and `tooltipMaxWidth` to control the tool tip width.
|
🎉 This PR is included in version 5.0.0-prerelease.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Added LongTextTooltip to component groups repo.