bbbdca6950
* added icon for atom and tokenInfo data update * borrow page initial commit * feat: borrow funds to ca and wallet * close borrow module on tx success * feat: repay funds initial setup * repay funds action hook * repay slider. module state on borrow page component * styling: minor tweak to text colors * limit manual input on repay to max value * borrow funds component slider initial * style: max button typography * AssetRow extracted to separate file. organize imports * ContainerSecondary component added * loading indicator for pending actions * style: progress bar colors * tanstack table added * tanstack react-table dependency missing * table cleanup and layout adjustments * fix account stats formula and update market data to match spreadsheet * calculate max borrow amount hook * reset borrow and repay components on account change * max borrow amount decimals. memorized return * hook tanstack data with real data * redefine borrowedAssetsMap to map * update max borrow amount formulas * remove unnecessary table component. refactor borrow table
27 lines
626 B
TypeScript
27 lines
626 B
TypeScript
import React from 'react'
|
|
|
|
type Props = {
|
|
children: string
|
|
className?: string
|
|
onClick: (e: React.MouseEvent<HTMLButtonElement>) => void
|
|
disabled?: boolean
|
|
}
|
|
|
|
const Button = React.forwardRef<any, Props>(
|
|
({ children, className = '', onClick, disabled }, ref) => (
|
|
<button
|
|
ref={ref}
|
|
onClick={onClick}
|
|
className={`overflow-hidden text-ellipsis rounded-3xl bg-green-500 py-2 px-5 text-sm font-semibold text-white ${className} ${
|
|
disabled ? 'opacity-40' : ''
|
|
}`}
|
|
disabled={disabled}
|
|
>
|
|
{children}
|
|
</button>
|
|
)
|
|
)
|
|
|
|
Button.displayName = 'Button'
|
|
export default Button
|