align tab styles
This commit is contained in:
parent
d58ac010a2
commit
1b69fa81e6
|
@ -274,10 +274,10 @@ const AccountPage = () => {
|
||||||
<div className="hide-scroll flex space-x-2">
|
<div className="hide-scroll flex space-x-2">
|
||||||
{TABS.map((tab) => (
|
{TABS.map((tab) => (
|
||||||
<button
|
<button
|
||||||
className={`default-transition rounded-md border py-1.5 px-2.5 text-sm font-medium md:hover:bg-th-bkg-3 ${
|
className={`default-transition rounded-md py-1.5 px-2.5 text-sm font-medium md:hover:text-th-fgd-2 ${
|
||||||
activeTab === tab
|
activeTab === tab
|
||||||
? 'border-th-bkg-2 bg-th-bkg-2 text-th-active'
|
? 'bg-th-bkg-3 text-th-active'
|
||||||
: 'border-th-bkg-4 text-th-fgd-3'
|
: 'text-th-fgd-3'
|
||||||
}`}
|
}`}
|
||||||
onClick={() => setActiveTab(tab)}
|
onClick={() => setActiveTab(tab)}
|
||||||
key={tab}
|
key={tab}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { useTranslation } from 'next-i18next'
|
||||||
import { FunctionComponent } from 'react'
|
import { FunctionComponent } from 'react'
|
||||||
|
|
||||||
interface ChartRangeButtonsProps {
|
interface ChartRangeButtonsProps {
|
||||||
|
@ -15,6 +16,7 @@ const ChartRangeButtons: FunctionComponent<ChartRangeButtonsProps> = ({
|
||||||
onChange,
|
onChange,
|
||||||
names,
|
names,
|
||||||
}) => {
|
}) => {
|
||||||
|
const { t } = useTranslation(['common', 'account'])
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className="relative flex">
|
<div className="relative flex">
|
||||||
|
@ -44,7 +46,7 @@ const ChartRangeButtons: FunctionComponent<ChartRangeButtonsProps> = ({
|
||||||
width: `${100 / values.length}%`,
|
width: `${100 / values.length}%`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{names ? names[i] : v}
|
{names ? t(names[i]) : v}
|
||||||
</button>
|
</button>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue