Skip to content

Commit

Permalink
feat: image links, rename inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
toniocodo committed Aug 29, 2023
1 parent bd2c8e0 commit 190806f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
7 changes: 2 additions & 5 deletions apps/oeth/src/components/ApyHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,7 @@ export function ApyHeader() {
top: '-2px',
}}
>
<Box
component={'img'}
src={`https://app.oeth.com/images/downarrow.svg`}
/>
<Box component="img" src={`/images/downarrow.svg`} />
</IconButton>
</Stack>
</Box>
Expand All @@ -144,7 +141,7 @@ export function ApyHeader() {
direction="row"
>
<ValueContainer
icon="https://app.oeth.com/images/oeth.svg"
icon="/images/tokens/OETH.svg"
text={intl.formatMessage({ defaultMessage: 'OETH Balance' })}
value={intl.formatNumber(Number(oethBalance?.formatted ?? 0), {
minimumFractionDigits: 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export type BigintInputProps = {
isError?: boolean;
} & Omit<InputBaseProps, 'value' | 'onChange' | 'inputRef'>;

export const BigintInput = forwardRef<HTMLInputElement, BigintInputProps>(
export const BigIntInput = forwardRef<HTMLInputElement, BigintInputProps>(
({ value, decimals = 18, isLoading, isError, onChange, ...rest }, ref) => {
const [strVal, setStrVal] = useState(formatUnits(value, decimals));

Expand Down Expand Up @@ -103,4 +103,4 @@ export const BigintInput = forwardRef<HTMLInputElement, BigintInputProps>(
},
);

BigintInput.displayName = 'BigintInput';
BigIntInput.displayName = 'BigIntInput';
6 changes: 3 additions & 3 deletions libs/shared/components/src/Inputs/TokenInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { alpha, Box, Button, Skeleton, Stack, Typography } from '@mui/material';
import { useIntl } from 'react-intl';
import { formatUnits } from 'viem';

import { BigintInput } from './BigintInput';
import { BigIntInput } from './BigIntInput';

import type { StackProps } from '@mui/material';
import type { Token } from '@origin/shared/contracts';

import type { BigintInputProps } from './BigintInput';
import type { BigintInputProps } from './BigIntInput';

export type TokenInputProps = {
amount: bigint;
Expand Down Expand Up @@ -68,7 +68,7 @@ export const TokenInput = forwardRef<HTMLInputElement, TokenInputProps>(
return (
<Stack direction="row" {...rest}>
<Stack flexGrow={1} justifyContent="center" gap={1}>
<BigintInput
<BigIntInput
{...inputProps}
value={amount}
decimals={decimals}
Expand Down
2 changes: 1 addition & 1 deletion libs/shared/components/src/Inputs/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './BigintInput';
export * from './BigIntInput';
export * from './TokenInput';
2 changes: 1 addition & 1 deletion libs/shared/components/src/LinkIcon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function LinkIcon({ url, size = '0.875rem' }: Props) {
<Link href={url}>
<Box
component="img"
src="https://app.oeth.com/images/link-icon-purple.svg"
src="/images/link-icon-purple.svg"
sx={{ height: size, width: size }}
></Box>
</Link>
Expand Down

0 comments on commit 190806f

Please sign in to comment.