Skip to content

Commit

Permalink
Fix link text checkbox tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
dani-mp committed Jan 9, 2025
1 parent af32112 commit 9b4699a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ interface CommonCheckboxProps {
export function DisplayTextCheckbox(props: CommonCheckboxProps) {
const { checked, height = 130, setFieldValue } = props;

// Ref to the container to position the tooltip inside it.
const container = useRef<HTMLDivElement>(null);

return (
<Col>
<Flex
Expand All @@ -38,6 +41,7 @@ export function DisplayTextCheckbox(props: CommonCheckboxProps) {
justifyContent="space-between"
alignItems="center"
width="100%"
ref={container}
>
<Flex>
<Checkbox
Expand All @@ -49,8 +53,9 @@ export function DisplayTextCheckbox(props: CommonCheckboxProps) {
Allow display text
</Flex>
<Tooltip
content="Allow editors to customize the link display text"
containerRef={container}
align="end"
content="Allow editors to customize the link display text"
>
<Icon name="alert" size="medium" color="grey11" />
</Tooltip>
Expand Down

0 comments on commit 9b4699a

Please sign in to comment.