Skip to content

Commit

Permalink
bugfix - tooltip not displaying properly (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-babylonlabs authored Aug 7, 2024
2 parents 3b4bbb7 + 93f5110 commit 576853d
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 16 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simple-staking",
"version": "0.2.30",
"version": "0.2.31",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Connect/ConnectSmall.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const ConnectSmall: React.FC<ConnectSmallProps> = ({
>
<AiOutlineInfoCircle />
</span>
<Tooltip id="tooltip-connect" />
<Tooltip id="tooltip-connect" className="tooltip-wrap" />
</>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Delegations/Delegation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export const Delegation: React.FC<DelegationProps> = ({
>
<AiOutlineInfoCircle />
</span>
<Tooltip id={`tooltip-${stakingTxHash}`} />
<Tooltip id={`tooltip-${stakingTxHash}`} className="tooltip-wrap" />
</div>
</div>
{generateActionButton()}
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/FinalityProviders/FinalityProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const FinalityProvider: React.FC<FinalityProviderProps> = ({
0
)}
</div>
<Tooltip id="tooltip-missing" />
<Tooltip id="tooltip-missing" className="tooltip-wrap" />
</div>
);
};
4 changes: 2 additions & 2 deletions src/app/components/FinalityProviders/FinalityProviders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ export const FinalityProviders: React.FC<FinalityProvidersProps> = ({
)}
</InfiniteScroll>
</div>
<Tooltip id="tooltip-delegations" />
<Tooltip id="tooltip-stake" />
<Tooltip id="tooltip-delegations" className="tooltip-wrap" />
<Tooltip id="tooltip-stake" className="tooltip-wrap" />
</div>
);
};
2 changes: 1 addition & 1 deletion src/app/components/Modals/ConnectModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export const ConnectModal: React.FC<ConnectModalProps> = ({
>
<AiOutlineInfoCircle />
</span>
<Tooltip id={name} />
<Tooltip id={name} className="tooltip-wrap" />
</div>
)}
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/Stakers/Stakers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ export const Stakers: React.FC<StakersProps> = () => {
<LoadingView />
)}
</div>
<Tooltip id="tooltip-delegations" />
<Tooltip id="tooltip-stake" />
<Tooltip id="tooltip-delegations" className="tooltip-wrap" />
<Tooltip id="tooltip-stake" className="tooltip-wrap" />
</div>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const FinalityProvider: React.FC<FinalityProviderProps> = ({
>
<AiOutlineInfoCircle size={16} />
</span>
<Tooltip id="tooltip-missing-fp" />
<Tooltip id="tooltip-missing-fp" className="tooltip-wrap" />
<span>No data provided</span>
</div>
)}
Expand All @@ -100,7 +100,10 @@ export const FinalityProvider: React.FC<FinalityProviderProps> = ({
>
<AiOutlineInfoCircle />
</span>
<Tooltip id={`tooltip-delegation-${pkHex}`} />
<Tooltip
id={`tooltip-delegation-${pkHex}`}
className="tooltip-wrap"
/>
</div>
<div className="flex items-center justify-end gap-1 lg:justify-start">
<p className="hidden sm:flex lg:hidden">Commission:</p>
Expand All @@ -115,7 +118,10 @@ export const FinalityProvider: React.FC<FinalityProviderProps> = ({
>
<AiOutlineInfoCircle />
</span>
<Tooltip id={`tooltip-delegation-${pkHex}`} />
<Tooltip
id={`tooltip-delegation-${pkHex}`}
className="tooltip-wrap"
/>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Staking/Staking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ export const Staking: React.FC<StakingProps> = ({
>
Preview
</button>
<Tooltip id="tooltip-staking-preview" />
<Tooltip id="tooltip-staking-preview" className="tooltip-wrap" />
</span>
{previewReady && (
<PreviewModal
Expand Down
5 changes: 4 additions & 1 deletion src/app/components/Stats/Stats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,10 @@ export const Stats: React.FC = () => {
>
<AiOutlineInfoCircle />
</span>
<Tooltip id={`tooltip-${subSection.title}`} />
<Tooltip
id={`tooltip-${subSection.title}`}
className="tooltip-wrap"
/>
</>
)}
</div>
Expand Down
6 changes: 6 additions & 0 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,9 @@ input[type="number"] {
body.modal-open {
overflow: hidden;
}

.tooltip-wrap {
max-width: 20rem;
white-space: normal;
word-wrap: break-word;
}

0 comments on commit 576853d

Please sign in to comment.