align tab styles

This commit is contained in:
saml33 2023-02-06 13:57:31 +11:00
parent d58ac010a2
commit 1b69fa81e6
2 changed files with 6 additions and 4 deletions

View File

@ -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}

View File

@ -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>