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

change: [UIE-8254] - Add tooltip for ipv6 for new db clusters #11231

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ export const DatabaseSummaryConnectionDetails = (props: Props) => {
const password =
showCredentials && credentials ? credentials?.password : 'β€’β€’β€’β€’β€’β€’β€’β€’β€’β€’';

const hostTooltipComponentProps = {
tooltip: {
style: {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
style: {
sx: {

Copy link
Contributor

Choose a reason for hiding this comment

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

We don't want to apply this to the style attribute, instead just use the sx prop built into the component

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you. Being a newbie to this project (and React and...) I was admittedly hurrying to find an example where I could change the width of the tooltip itself, and ran across one that did it like this.

minWidth: 285,
},
},
};
const HOST_TOOLTIP_COPY =
'Use the IPv6 address (AAAA record) for this hostname to avoid network transfer charges when connecting to this database from Linodes within the same region.';

const handleShowPasswordClick = () => {
setShowPassword((showCredentials) => !showCredentials);
};
Expand Down Expand Up @@ -226,6 +236,14 @@ export const DatabaseSummaryConnectionDetails = (props: Props) => {
className={classes.inlineCopyToolTip}
text={database.hosts?.primary}
/>
{!isLegacy && (
<TooltipIcon
status="help"
sxTooltipIcon={sxTooltipIcon}
componentsProps={hostTooltipComponentProps}
text={HOST_TOOLTIP_COPY}
/>
)}
</>
) : (
<Typography>
Expand Down