Skip to content

Conversation

@dlabaj
Copy link
Collaborator

@dlabaj dlabaj commented Sep 26, 2023

Added LongTextTooltip to component groups repo.

Screenshot 2023-09-26 at 11 34 37 AM

@fhlavac
Copy link
Contributor

fhlavac commented Sep 29, 2023

@dlabaj looks good! We may just need to update the documentation according to standards set in #43

@@ -0,0 +1,3 @@
export { default } from './LongTextTooltip';
export { default as LongTextTooltip } from './LongTextTooltip';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should not provide a named export for the component, just a default one

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all set.

…roups/examples/LongTextTooltip/LongTextTooltip.md

Co-authored-by: Filip Hlavac <[email protected]>
@fhlavac fhlavac merged commit b62f671 into patternfly:main Oct 3, 2023
@github-actions
Copy link

github-actions bot commented Oct 3, 2023

🎉 This PR is included in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.
Copy link
Collaborator

@edonehoo edonehoo Oct 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

---
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.

@github-actions
Copy link

github-actions bot commented Nov 1, 2023

🎉 This PR is included in version 5.0.0-prerelease.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants