Skip to content

Commit

Permalink
wails: add description tooltip (#839)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thykof authored Nov 9, 2023
1 parent f48cad0 commit cf6b01a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions wails-frontend/src/i18n/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"operation-type": "Operation type",
"operation-const": "Operation cost",
"description": "Description",
"description-tooltip": "Description provided by a dApp",
"message": "Message",
"view-details": "View details",
"message-format": "Message format: ",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { AccordionCategory, AccordionContent } from '@massalabs/react-ui-kit';
import {
AccordionCategory,
AccordionContent,
Tooltip,
} from '@massalabs/react-ui-kit';
import { FiChevronDown, FiChevronUp, FiInfo } from 'react-icons/fi';

import Intl from '@/i18n/i18n';
Expand All @@ -22,8 +26,12 @@ export function Description(props: DescriptionProps) {
iconClose={<FiChevronUp />}
customClass="px-0 py-0"
categoryTitle={
<div className="flex items-center w-full gap-4">
<FiInfo size={18} />
<div className="flex items-center w-full">
<Tooltip
icon={<FiInfo size={18} />}
className="mas-caption pl-0 pr-2"
content={Intl.t('password-prompt.sign.description-tooltip')}
/>
<p>{Intl.t(label)}</p>
</div>
}
Expand Down

0 comments on commit cf6b01a

Please sign in to comment.