Skip to content

Commit 30abc95

Browse files
changed tooltip content
1 parent 53b2291 commit 30abc95

File tree

4 files changed

+29
-8
lines changed

4 files changed

+29
-8
lines changed

src/modules/core/components/Popover/Tooltip.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ interface Props {
2929

3030
/** Set the open state from outside */
3131
isOpen?: boolean;
32+
interactive?: boolean;
3233
}
3334

3435
const Tooltip = ({
@@ -39,6 +40,7 @@ const Tooltip = ({
3940
showArrow = true,
4041
trigger = 'hover',
4142
isOpen,
43+
interactive = false,
4244
}: Props) => {
4345
const {
4446
getArrowProps,
@@ -52,6 +54,8 @@ const Tooltip = ({
5254
placement,
5355
trigger: content ? trigger : null,
5456
visible: isOpen,
57+
delayHide: interactive ? 200 : 0,
58+
interactive,
5559
},
5660
popperOptions,
5761
);

src/modules/core/components/QuestionMarkTooltip/QuestionMarkTooltip.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,21 @@ import { MessageDescriptor, FormattedMessage } from 'react-intl';
44

55
import Icon from '~core/Icon';
66
import { Tooltip } from '~core/Popover';
7-
import { SimpleMessageValues } from '~types/index';
7+
import { UniversalMessageValues } from '~types/index';
88

99
const displayName = 'QuestionMarkTooltip';
1010

1111
interface Props {
1212
tooltipText: string | MessageDescriptor;
13-
tooltipTextValues?: SimpleMessageValues;
13+
tooltipTextValues?: UniversalMessageValues;
1414
/** Options to pass to the underlying PopperJS element. See here for more: https://popper.js.org/docs/v2/constructors/#options. */
1515
tooltipPopperOptions?: PopperOptions;
1616
className?: string;
1717
tooltipClassName?: string;
1818
iconTitle?: string;
1919
showArrow?: boolean;
2020
invertedIcon?: boolean;
21+
interactive?: boolean;
2122
}
2223

2324
const QuestionMarkTooltip = ({
@@ -39,6 +40,7 @@ const QuestionMarkTooltip = ({
3940
className,
4041
showArrow,
4142
invertedIcon,
43+
interactive,
4244
}: Props) => {
4345
return (
4446
<>
@@ -55,6 +57,7 @@ const QuestionMarkTooltip = ({
5557
trigger="hover"
5658
showArrow={showArrow}
5759
popperOptions={tooltipPopperOptions}
60+
interactive={interactive}
5861
>
5962
<div className={className}>
6063
<Icon

src/modules/dashboard/components/Incorporation/IncorporationForm/LockedProtectors/LockedProtectors.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { ValuesType } from '~pages/IncorporationPage/types';
77
import UserAvatar from '~core/UserAvatar';
88
import UserMention from '~core/UserMention';
99
import Tag from '~core/Tag';
10+
import Link from '~core/Link';
1011

1112
import { SignOption, VerificationStatus } from '../constants';
1213

@@ -19,7 +20,7 @@ export const MSG = defineMessages({
1920
},
2021
protectorsTooltip: {
2122
id: `dashboard.Incorporation.IncorporationForm.LockedProtectors.protectorsTooltip`,
22-
defaultMessage: `A Protector's role in a DAO legal corporation is to ratify the decisions of the DAO. Their purpose is to act on behalf of the DAO and handle legal the required administration. Learn more`,
23+
defaultMessage: `A Protector's role in a DAO legal corporation is to ratify the decisions of the DAO. Their purpose is to act on behalf of the DAO for legal matters and any required legal administration. <a>Learn more.</a>`,
2324
},
2425
unverified: {
2526
id: `dashboard.Incorporation.IncorporationForm.LockedProtectors.unverified`,
@@ -39,7 +40,7 @@ export const MSG = defineMessages({
3940
},
4041
mainContactTooltip: {
4142
id: `dashboard.Incorporation.IncorporationForm.LockedProtectors.mainContactTooltip`,
42-
defaultMessage: `The main contact is required during the incorporation process and is also required to use their delivery address details for the registration.`,
43+
defaultMessage: `The main contact is required during the incorporation process for administration purposes.`,
4344
},
4445
signOptionTooltip: {
4546
id: `dashboard.Incorporation.IncorporationForm.LockedProtectors.signOptionTooltip`,
@@ -76,7 +77,13 @@ const LockedProtectors = ({ formValues }: Props) => {
7677
<div className={styles.label}>
7778
<FormattedMessage {...MSG.protectors} />
7879
</div>
79-
<QuestionMarkTooltip tooltipText={MSG.protectorsTooltip} />
80+
<QuestionMarkTooltip
81+
tooltipText={MSG.protectorsTooltip}
82+
tooltipTextValues={{
83+
a: (chunks) => <Link to="/">{chunks}</Link>, // link is a mock, add redirection to the correct page
84+
}}
85+
interactive
86+
/>
8087
</div>
8188
</div>
8289
</FormSection>

src/modules/dashboard/components/Incorporation/IncorporationForm/Protectors/Protectors.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { filterUserSelection } from '~core/SingleUserPicker';
1414
import { supRenderAvatar } from '~dashboard/ExpenditurePage/Recipient/Recipient';
1515
import { Protector } from '~pages/IncorporationPage/types';
1616
import Button from '~core/Button';
17+
import Link from '~core/Link';
1718

1819
import Radio from '../Radio';
1920
import { SignOption } from '../types';
@@ -28,7 +29,7 @@ export const MSG = defineMessages({
2829
},
2930
protectorsTooltip: {
3031
id: `dashboard.Incorporation.IncorporationForm.Protectors.protectorsTooltip`,
31-
defaultMessage: `A Protector's role in a DAO legal corporation is to ratify the decisions of the DAO. Their purpose is to act on behalf of the DAO and handle legal the required administration. Learn more`,
32+
defaultMessage: `A Protector's role in a DAO legal corporation is to ratify the decisions of the DAO. Their purpose is to act on behalf of the DAO for legal matters and any required legal administration. <a>Learn more.</a>`,
3233
},
3334
deleteIconTitle: {
3435
id: `dashboard.Incorporation.IncorporationForm.Protectors.deleteIconTitle`,
@@ -56,7 +57,7 @@ export const MSG = defineMessages({
5657
},
5758
mainContactTooltip: {
5859
id: `dashboard.Incorporation.IncorporationForm.Protectors.mainContactTooltip`,
59-
defaultMessage: `The main contact is required during the incorporation process and is also required to use their delivery address details for the registration.`,
60+
defaultMessage: `The main contact is required during the incorporation process for administration purposes.`,
6061
},
6162
});
6263

@@ -130,7 +131,13 @@ const Protectors = ({ colony, sidebarRef }: Props) => {
130131
}}
131132
/>
132133
</div>
133-
<QuestionMarkTooltip tooltipText={MSG.protectorsTooltip} />
134+
<QuestionMarkTooltip
135+
tooltipText={MSG.protectorsTooltip}
136+
tooltipTextValues={{
137+
a: (chunks) => <Link to="/">{chunks}</Link>, // link is a mock, add redirection to the correct page
138+
}}
139+
interactive
140+
/>
134141
</div>
135142
<FieldArray
136143
name="protectors"

0 commit comments

Comments
 (0)