Skip to content

Commit 07c46dc

Browse files
committed
feat(web): show-answer-description-in-tooltip
1 parent e34ed7a commit 07c46dc

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

web/src/pages/Cases/CaseDetails/Voting/Classic/OptionsContainer.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import styled from "styled-components";
44
import ReactMarkdown from "react-markdown";
55
import { useParams } from "react-router-dom";
66

7-
import { Button } from "@kleros/ui-components-library";
7+
import { Button, Tooltip } from "@kleros/ui-components-library";
88

99
import { usePopulatedDisputeData } from "hooks/queries/usePopulatedDisputeData";
1010
import { isUndefined } from "utils/index";
@@ -86,12 +86,14 @@ const Options: React.FC<IOptions> = ({ arbitrable, handleSelection, justificatio
8686
<OptionsContainer>
8787
{disputeDetails?.answers?.map((answer: Answer) => {
8888
return (
89-
<Button
90-
text={answer.title}
91-
disabled={isSending}
92-
isLoading={chosenOption === BigInt(answer.id)}
93-
onClick={() => onClick(BigInt(answer.id))}
94-
/>
89+
<Tooltip text={answer.description} key={answer.title}>
90+
<Button
91+
text={answer.title}
92+
disabled={isSending}
93+
isLoading={chosenOption === BigInt(answer.id)}
94+
onClick={() => onClick(BigInt(answer.id))}
95+
/>
96+
</Tooltip>
9597
);
9698
})}
9799
</OptionsContainer>

0 commit comments

Comments
 (0)