Skip to content

Commit

Permalink
Rename AutosizeInput to Input
Browse files Browse the repository at this point in the history
  • Loading branch information
Anboias committed Nov 28, 2024
1 parent 47ecd22 commit 6f666fb
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/input/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { default as AutosizeInput } from './autosize-input';
export { default as Input } from './input';
export { default as TextareaInput } from './textarea-input';
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ChangeEventHandler } from 'react';
import classNames from 'classnames';
import AutosizeInput from 'react-input-autosize';
import NumberFormat from 'react-number-format';
import styles from './autosize-input.module.scss';
import styles from './input.module.scss';

type Props = {
onChange: ChangeEventHandler<HTMLInputElement>;
Expand Down
4 changes: 2 additions & 2 deletions src/pages/dashboard/forms/token-amount-form.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BigNumber } from 'ethers';
import { useState } from 'react';
import { ModalFooter, ModalHeader } from '../../../components/modal';
import { AutosizeInput } from '../../../components/input';
import { Input } from '../../../components/input';
import Button from '../../../components/button';
import { formatApi3, parseApi3, messages } from '../../../utils';
import styles from './forms.module.scss';
Expand Down Expand Up @@ -52,7 +52,7 @@ const TokenAmountForm = (props: Props) => {

<div className={styles.formContent}>
<div className={styles.inputWrapper}>
<AutosizeInput type="number" value={inputValue} onChange={(e) => onChange(e.target.value)} autoFocus />
<Input type="number" value={inputValue} onChange={(e) => onChange(e.target.value)} autoFocus />
{maxValue && (
<Button type="tertiary-color" onClick={handleSetMax} size="xs" sm={{ size: 'sm' }}>
Max
Expand Down
4 changes: 2 additions & 2 deletions src/pages/dashboard/forms/token-deposit-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useState } from 'react';
import { MAX_ALLOWANCE, useApi3Pool, useApi3Token } from '../../../contracts';
import { useChainData } from '../../../chain-data';
import { ModalFooter, ModalHeader } from '../../../components/modal';
import { AutosizeInput } from '../../../components/input';
import { Input } from '../../../components/input';
import Button from '../../../components/button';
import { notifications } from '../../../components/notifications';
import { isUserRejection, formatApi3, parseApi3, messages, UNKNOWN_NUMBER } from '../../../utils';
Expand Down Expand Up @@ -95,7 +95,7 @@ const TokenDepositForm = (props: Props) => {

<div className={styles.formContent}>
<div className={styles.inputWrapper}>
<AutosizeInput type="number" value={inputValue} onChange={(e) => setInputValue(e.target.value)} autoFocus />
<Input type="number" value={inputValue} onChange={(e) => setInputValue(e.target.value)} autoFocus />
<Button type="tertiary-color" onClick={handleSetMax} size="xs" sm={{ size: 'sm' }}>
Max
</Button>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/proposals/forms/delegate/delegate-form.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from 'react';
import classNames from 'classnames';
import Button from '../../../../components/button';
import { AutosizeInput } from '../../../../components/input';
import { Input } from '../../../../components/input';
import { ModalFooter, ModalHeader } from '../../../../components/modal';
import { useChainData } from '../../../../chain-data';
import { useApi3Pool } from '../../../../contracts';
Expand Down Expand Up @@ -68,7 +68,7 @@ const DelegateVotesForm = (props: Props) => {
<ModalHeader>Delegate my votes to:</ModalHeader>

<div className={globalStyles.textCenter}>
<AutosizeInput
<Input
type="text"
placeholder="Enter address or ENS name here"
value={delegationAddress}
Expand Down

0 comments on commit 6f666fb

Please sign in to comment.