Skip to content

Commit

Permalink
add tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
talentlessguy committed Sep 4, 2024
1 parent 663975a commit 4b60fda
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions public/locales/en/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@
"wrapName": "Wrap Name",
"unwrap": "Unwrap Name",
"unwrapWarning": "This name has revoked the permissions needed for this action.",
"tooltip": "The Name Wrapper enables additional functionality on ENS names.",
"status": {
"unwrapped": "Unwrapped",
"wrapped": "Wrapped"
Expand Down
14 changes: 13 additions & 1 deletion src/components/pages/profile/[name]/tabs/MoreTab/NameWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { AlertSVG, CheckSVG, LockSVG, mq, Typography } from '@ensdomains/thorin'

import { cacheableComponentStyles } from '@app/components/@atoms/CacheableComponent'
import { DisabledButtonWithTooltip } from '@app/components/@molecules/DisabledButtonWithTooltip'
import { QuestionTooltip } from '@app/components/@molecules/QuestionTooltip/QuestionTooltip'
import { NameWrapperState } from '@app/hooks/fuses/useFusesStates'
import type { Profile } from '@app/types'

Expand Down Expand Up @@ -87,6 +88,14 @@ const HeaderContainer = styled.div`
justify-content: space-between;
`

const Header = styled.div(
({ theme }) => css`
display: flex;
align-items: center;
gap: ${theme.space[2]};
`,
)

const getFuseStateFromWrapperData = (wrapperData?: GetWrapperDataReturnType): NameWrapperState =>
match(wrapperData)
.with(P.nullish, () => 'unwrapped' as const)
Expand Down Expand Up @@ -119,7 +128,10 @@ export const NameWrapper = ({
return (
<Container>
<HeaderContainer>
<Typography fontVariant="headingFour">{t('tabs.more.token.nameWrapper')}</Typography>
<Header>
<Typography fontVariant="headingFour">{t('tabs.more.token.nameWrapper')}</Typography>
<QuestionTooltip content={t('tabs.more.token.tooltip')} />
</Header>
{isButtonDisplayed ? (
isWrapped ? (
status === 'locked' ? (
Expand Down

0 comments on commit 4b60fda

Please sign in to comment.