buttongroup large prop
This commit is contained in:
parent
8844e19a9f
commit
4b5c607c0d
|
@ -7,6 +7,7 @@ interface ButtonGroupProps {
|
||||||
unit?: string
|
unit?: string
|
||||||
values: Array<any>
|
values: Array<any>
|
||||||
names?: Array<string>
|
names?: Array<string>
|
||||||
|
large?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const ButtonGroup: FunctionComponent<ButtonGroupProps> = ({
|
const ButtonGroup: FunctionComponent<ButtonGroupProps> = ({
|
||||||
|
@ -16,6 +17,7 @@ const ButtonGroup: FunctionComponent<ButtonGroupProps> = ({
|
||||||
values,
|
values,
|
||||||
onChange,
|
onChange,
|
||||||
names,
|
names,
|
||||||
|
large,
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<div className="rounded-md bg-th-bkg-3">
|
<div className="rounded-md bg-th-bkg-3">
|
||||||
|
@ -33,7 +35,9 @@ const ButtonGroup: FunctionComponent<ButtonGroupProps> = ({
|
||||||
) : null}
|
) : null}
|
||||||
{values.map((v, i) => (
|
{values.map((v, i) => (
|
||||||
<button
|
<button
|
||||||
className={`${className} default-transition relative w-1/2 cursor-pointer rounded-md px-2 py-1.5 text-center text-xs font-normal
|
className={`${className} default-transition relative w-1/2 cursor-pointer rounded-md px-2 text-center ${
|
||||||
|
large ? 'h-12 text-sm' : 'h-10 text-xs'
|
||||||
|
} font-normal
|
||||||
${
|
${
|
||||||
v === activeValue
|
v === activeValue
|
||||||
? `text-th-primary`
|
? `text-th-primary`
|
||||||
|
|
|
@ -290,7 +290,7 @@ const Swap = () => {
|
||||||
<ButtonGroup
|
<ButtonGroup
|
||||||
activeValue={sizePercentage}
|
activeValue={sizePercentage}
|
||||||
onChange={(p) => handleSizePercentage(p)}
|
onChange={(p) => handleSizePercentage(p)}
|
||||||
values={['0', '25', '50', '75', '100']}
|
values={['10', '25', '50', '75', '100']}
|
||||||
unit="%"
|
unit="%"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -57,17 +57,19 @@ const Settings: NextPage = () => {
|
||||||
activeValue={theme}
|
activeValue={theme}
|
||||||
onChange={(t) => setTheme(t)}
|
onChange={(t) => setTheme(t)}
|
||||||
values={THEMES}
|
values={THEMES}
|
||||||
|
large
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col border-t border-th-bkg-3 p-4 md:flex-row md:items-center md:justify-between">
|
<div className="flex flex-col border-t border-th-bkg-3 p-4 md:flex-row md:items-center md:justify-between">
|
||||||
<p className="mb-2 lg:mb-0">{t('language')}</p>
|
<p className="mb-2 lg:mb-0">{t('language')}</p>
|
||||||
<div className="w-full min-w-[280px] md:w-auto">
|
<div className="w-full min-w-[300px] md:w-auto">
|
||||||
<ButtonGroup
|
<ButtonGroup
|
||||||
activeValue={savedLanguage}
|
activeValue={savedLanguage}
|
||||||
onChange={(l) => handleLangChange(l)}
|
onChange={(l) => handleLangChange(l)}
|
||||||
values={LANGS.map((val) => val.locale)}
|
values={LANGS.map((val) => val.locale)}
|
||||||
names={LANGS.map((val) => t(val.name))}
|
names={LANGS.map((val) => t(val.name))}
|
||||||
|
large
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
"borrow": "Borrow",
|
"borrow": "Borrow",
|
||||||
"borrow-value": "Borrow Value",
|
"borrow-value": "Borrow Value",
|
||||||
"buy": "Buy",
|
"buy": "Buy",
|
||||||
|
"chinese": "简体中文",
|
||||||
|
"chinese-traditional": "繁體中文",
|
||||||
"close-account": "Close Account",
|
"close-account": "Close Account",
|
||||||
"collateral-multiplier": "Collateral Multiplier",
|
"collateral-multiplier": "Collateral Multiplier",
|
||||||
"collateral-multiplier-desc": "Each token on Mango has a multiplier used to calculate the collateral value of that token. The higher the multiplier, the more collateral you get.",
|
"collateral-multiplier-desc": "Each token on Mango has a multiplier used to calculate the collateral value of that token. The higher the multiplier, the more collateral you get.",
|
||||||
|
@ -14,6 +16,7 @@
|
||||||
"daily-volume": "24h Volume",
|
"daily-volume": "24h Volume",
|
||||||
"deposit": "Deposit",
|
"deposit": "Deposit",
|
||||||
"deposit-value": "Deposit Value",
|
"deposit-value": "Deposit Value",
|
||||||
|
"english": "English",
|
||||||
"fee": "Fee",
|
"fee": "Fee",
|
||||||
"fees": "Fees",
|
"fees": "Fees",
|
||||||
"governance": "Governance",
|
"governance": "Governance",
|
||||||
|
@ -33,7 +36,9 @@
|
||||||
"select-token": "Select Token",
|
"select-token": "Select Token",
|
||||||
"sell": "Sell",
|
"sell": "Sell",
|
||||||
"settings": "Settings",
|
"settings": "Settings",
|
||||||
|
"spanish": "Español",
|
||||||
"stats": "Stats",
|
"stats": "Stats",
|
||||||
|
"theme": "Theme",
|
||||||
"token": "Token",
|
"token": "Token",
|
||||||
"tokens": "Tokens",
|
"tokens": "Tokens",
|
||||||
"token-collateral-multiplier": "{{token}} Collateral Multiplier",
|
"token-collateral-multiplier": "{{token}} Collateral Multiplier",
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
"borrow": "Borrow",
|
"borrow": "Borrow",
|
||||||
"borrow-value": "Borrow Value",
|
"borrow-value": "Borrow Value",
|
||||||
"buy": "Buy",
|
"buy": "Buy",
|
||||||
|
"chinese": "简体中文",
|
||||||
|
"chinese-traditional": "繁體中文",
|
||||||
"close-account": "Close Account",
|
"close-account": "Close Account",
|
||||||
"collateral-multiplier": "Collateral Multiplier",
|
"collateral-multiplier": "Collateral Multiplier",
|
||||||
"collateral-multiplier-desc": "Each token on Mango has a multiplier used to calculate the collateral value of that token. The higher the multiplier, the more collateral you get.",
|
"collateral-multiplier-desc": "Each token on Mango has a multiplier used to calculate the collateral value of that token. The higher the multiplier, the more collateral you get.",
|
||||||
|
@ -14,6 +16,7 @@
|
||||||
"daily-volume": "24h Volume",
|
"daily-volume": "24h Volume",
|
||||||
"deposit": "Deposit",
|
"deposit": "Deposit",
|
||||||
"deposit-value": "Deposit Value",
|
"deposit-value": "Deposit Value",
|
||||||
|
"english": "English",
|
||||||
"fee": "Fee",
|
"fee": "Fee",
|
||||||
"fees": "Fees",
|
"fees": "Fees",
|
||||||
"governance": "Governance",
|
"governance": "Governance",
|
||||||
|
@ -33,7 +36,9 @@
|
||||||
"select-token": "Select Token",
|
"select-token": "Select Token",
|
||||||
"sell": "Sell",
|
"sell": "Sell",
|
||||||
"settings": "Settings",
|
"settings": "Settings",
|
||||||
|
"spanish": "Español",
|
||||||
"stats": "Stats",
|
"stats": "Stats",
|
||||||
|
"theme": "Theme",
|
||||||
"token": "Token",
|
"token": "Token",
|
||||||
"tokens": "Tokens",
|
"tokens": "Tokens",
|
||||||
"token-collateral-multiplier": "{{token}} Collateral Multiplier",
|
"token-collateral-multiplier": "{{token}} Collateral Multiplier",
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
"borrow": "Borrow",
|
"borrow": "Borrow",
|
||||||
"borrow-value": "Borrow Value",
|
"borrow-value": "Borrow Value",
|
||||||
"buy": "Buy",
|
"buy": "Buy",
|
||||||
|
"chinese": "简体中文",
|
||||||
|
"chinese-traditional": "繁體中文",
|
||||||
"close-account": "Close Account",
|
"close-account": "Close Account",
|
||||||
"collateral-multiplier": "Collateral Multiplier",
|
"collateral-multiplier": "Collateral Multiplier",
|
||||||
"collateral-multiplier-desc": "Each token on Mango has a multiplier used to calculate the collateral value of that token. The higher the multiplier, the more collateral you get.",
|
"collateral-multiplier-desc": "Each token on Mango has a multiplier used to calculate the collateral value of that token. The higher the multiplier, the more collateral you get.",
|
||||||
|
@ -14,6 +16,7 @@
|
||||||
"daily-volume": "24h Volume",
|
"daily-volume": "24h Volume",
|
||||||
"deposit": "Deposit",
|
"deposit": "Deposit",
|
||||||
"deposit-value": "Deposit Value",
|
"deposit-value": "Deposit Value",
|
||||||
|
"english": "English",
|
||||||
"fee": "Fee",
|
"fee": "Fee",
|
||||||
"fees": "Fees",
|
"fees": "Fees",
|
||||||
"governance": "Governance",
|
"governance": "Governance",
|
||||||
|
@ -33,7 +36,9 @@
|
||||||
"select-token": "Select Token",
|
"select-token": "Select Token",
|
||||||
"sell": "Sell",
|
"sell": "Sell",
|
||||||
"settings": "Settings",
|
"settings": "Settings",
|
||||||
|
"spanish": "Español",
|
||||||
"stats": "Stats",
|
"stats": "Stats",
|
||||||
|
"theme": "Theme",
|
||||||
"token": "Token",
|
"token": "Token",
|
||||||
"tokens": "Tokens",
|
"tokens": "Tokens",
|
||||||
"token-collateral-multiplier": "{{token}} Collateral Multiplier",
|
"token-collateral-multiplier": "{{token}} Collateral Multiplier",
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
"borrow": "Borrow",
|
"borrow": "Borrow",
|
||||||
"borrow-value": "Borrow Value",
|
"borrow-value": "Borrow Value",
|
||||||
"buy": "Buy",
|
"buy": "Buy",
|
||||||
|
"chinese": "简体中文",
|
||||||
|
"chinese-traditional": "繁體中文",
|
||||||
"close-account": "Close Account",
|
"close-account": "Close Account",
|
||||||
"collateral-multiplier": "Collateral Multiplier",
|
"collateral-multiplier": "Collateral Multiplier",
|
||||||
"collateral-multiplier-desc": "Each token on Mango has a multiplier used to calculate the collateral value of that token. The higher the multiplier, the more collateral you get.",
|
"collateral-multiplier-desc": "Each token on Mango has a multiplier used to calculate the collateral value of that token. The higher the multiplier, the more collateral you get.",
|
||||||
|
@ -14,6 +16,7 @@
|
||||||
"daily-volume": "24h Volume",
|
"daily-volume": "24h Volume",
|
||||||
"deposit": "Deposit",
|
"deposit": "Deposit",
|
||||||
"deposit-value": "Deposit Value",
|
"deposit-value": "Deposit Value",
|
||||||
|
"english": "English",
|
||||||
"fee": "Fee",
|
"fee": "Fee",
|
||||||
"fees": "Fees",
|
"fees": "Fees",
|
||||||
"governance": "Governance",
|
"governance": "Governance",
|
||||||
|
@ -33,7 +36,9 @@
|
||||||
"select-token": "Select Token",
|
"select-token": "Select Token",
|
||||||
"sell": "Sell",
|
"sell": "Sell",
|
||||||
"settings": "Settings",
|
"settings": "Settings",
|
||||||
|
"spanish": "Español",
|
||||||
"stats": "Stats",
|
"stats": "Stats",
|
||||||
|
"theme": "Theme",
|
||||||
"token": "Token",
|
"token": "Token",
|
||||||
"tokens": "Tokens",
|
"tokens": "Tokens",
|
||||||
"token-collateral-multiplier": "{{token}} Collateral Multiplier",
|
"token-collateral-multiplier": "{{token}} Collateral Multiplier",
|
||||||
|
|
Loading…
Reference in New Issue