Skip to content

Commit

Permalink
update types and remove export
Browse files Browse the repository at this point in the history
  • Loading branch information
abcrane123 committed Jun 10, 2024
1 parent 9246463 commit 2f9af59
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion site/docs/pages/swap/swap-amount-input.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ The `SwapAmountInput` component is a stylized input field designed for users to

## Props

[`SwapAmountInputReact`](/token/types#SwapAmountInputreact)
[`SwapAmountInputReact`](/swap/types#SwapAmountInputReact)

## CSS

Expand Down
17 changes: 17 additions & 0 deletions site/docs/pages/swap/types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,20 @@ description: Glossary of Types in Swap Kit.
---

# Types [Glossary of Types in Swap Kit.]

## `SwapAmountInputReact`

```ts
type SwapAmountInputReact = {
label: string; // Descriptive label for the input field
amount?: string; // Token amount
token?: Token; // Selected token
swappableTokens?: Token[];
tokenBalance?: string;
onMaxButtonClick: () => void;
onAmountChange: (amount: string) => void; // Callback function when the amount changes
onTokenSelectorClick: () => void; // Callback function when the token selector is clicked
onSelectTokenToggle: () => void;
disabled?: boolean; // Whether the input is disabled
};
```
14 changes: 0 additions & 14 deletions site/docs/pages/token/types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,4 @@ export type TokenSelectorDropdownReact = {
options: Token[]; // List of tokens
setToken: (token: Token) => void; // Token setter
};
```

## `TokenAmountInputReact`

```ts
type TokenAmountInputReact = {
label: string; // Descriptive label for the input field
amount?: string; // Token amount
onAmountChange: (amount: string) => void; // Callback function when the amount changes
onTokenSelectorClick: () => void; // Callback function when the token selector is clicked
token?: Token; // Selected token
estimatedAmountInFiat?: string; // Estimated amount in fiat currency
disabled?: boolean; // Whether the input is disabled
};
```
1 change: 0 additions & 1 deletion src/token/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export { TokenSelector } from './components/TokenSelector';
export { TokenSelectorDropdown } from './components/TokenSelectorDropdown';
export { formatAmount } from './core/formatAmount';
export { getTokens } from './core/getTokens';
export { TokenAmountInput } from './components/TokenAmountInput';
export type {
GetTokensError,
GetTokensOptions,
Expand Down

0 comments on commit 2f9af59

Please sign in to comment.