fix: icon styles
This commit is contained in:
parent
837d212ffc
commit
c613e5c73f
6 changed files with 19 additions and 16 deletions
|
|
@ -1,12 +1,13 @@
|
||||||
|
import { classes } from '@/utils/utils';
|
||||||
import styles from './styles.module.scss';
|
import styles from './styles.module.scss';
|
||||||
import { TooltipWrapperProps } from './types';
|
import { TooltipWrapperProps } from './types';
|
||||||
|
|
||||||
const TooltipWrapper = ({ children, text }: TooltipWrapperProps) => {
|
const TooltipWrapper = ({ children, text, className }: TooltipWrapperProps) => {
|
||||||
return (
|
return (
|
||||||
<div className={styles.tooltip}>
|
<div className={styles.tooltip}>
|
||||||
{children}
|
{children}
|
||||||
|
|
||||||
<div className={styles.tooltip__text}>{text}</div>
|
<div className={classes(styles.tooltip__text, className)}>{text}</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: max-content;
|
width: max-content;
|
||||||
|
display: grid;
|
||||||
|
place-content: center;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
.tooltip__text {
|
.tooltip__text {
|
||||||
|
|
|
||||||
|
|
@ -3,4 +3,5 @@ import { ReactNode } from 'react';
|
||||||
export interface TooltipWrapperProps {
|
export interface TooltipWrapperProps {
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
text: string;
|
text: string;
|
||||||
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -88,22 +88,22 @@ function PairsTable({ data }: IProps) {
|
||||||
<span>{quote.name}</span>
|
<span>{quote.name}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{featured && (
|
{whitelisted && (
|
||||||
<TooltipWrapper text="Featured">
|
<TooltipWrapper text="Whitelisted">
|
||||||
<Image
|
<Image
|
||||||
src="/ui/featured.svg"
|
src="/ui/whitelisted.svg"
|
||||||
alt="featured"
|
alt="whitelisted"
|
||||||
width={18}
|
width={18}
|
||||||
height={18}
|
height={18}
|
||||||
/>
|
/>
|
||||||
</TooltipWrapper>
|
</TooltipWrapper>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{whitelisted && (
|
{featured && (
|
||||||
<TooltipWrapper text="Whitelisted">
|
<TooltipWrapper text="Featured">
|
||||||
<Image
|
<Image
|
||||||
src="/ui/whitelisted.svg"
|
src="/ui/featured.svg"
|
||||||
alt="whitelisted"
|
alt="featured"
|
||||||
width={18}
|
width={18}
|
||||||
height={18}
|
height={18}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
|
||||||
border-top-left-radius: 10px;
|
border-top-left-radius: 10px;
|
||||||
border-top-right-radius: 10px;
|
border-top-right-radius: 10px;
|
||||||
background-color: var(--table-header-bg);
|
background-color: var(--table-header-bg);
|
||||||
|
|
|
||||||
|
|
@ -60,16 +60,16 @@ export default function PairsCard({ pair }: IProps) {
|
||||||
<span>/</span>
|
<span>/</span>
|
||||||
<span>{secondCurrency.name}</span>
|
<span>{secondCurrency.name}</span>
|
||||||
</div>
|
</div>
|
||||||
{isFeatured && (
|
|
||||||
<TooltipWrapper text="Featured">
|
|
||||||
<Image src="/ui/featured.svg" alt="featured" width={24} height={24} />
|
|
||||||
</TooltipWrapper>
|
|
||||||
)}
|
|
||||||
{isWhitelisted && (
|
{isWhitelisted && (
|
||||||
<TooltipWrapper text="Whitelisted">
|
<TooltipWrapper text="Whitelisted">
|
||||||
<Image src="/ui/whitelisted.svg" alt="whitelisted" width={24} height={24} />
|
<Image src="/ui/whitelisted.svg" alt="whitelisted" width={24} height={24} />
|
||||||
</TooltipWrapper>
|
</TooltipWrapper>
|
||||||
)}
|
)}
|
||||||
|
{isFeatured && (
|
||||||
|
<TooltipWrapper text="Featured">
|
||||||
|
<Image src="/ui/featured.svg" alt="featured" width={24} height={24} />
|
||||||
|
</TooltipWrapper>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.card__body}>
|
<div className={styles.card__body}>
|
||||||
<div className={styles.card__body_wrapper}>
|
<div className={styles.card__body_wrapper}>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue