diff --git a/extension/src/components/Input.tsx b/extension/src/components/Input.tsx
index c9cfc36a..5f5a6f1a 100644
--- a/extension/src/components/Input.tsx
+++ b/extension/src/components/Input.tsx
@@ -1,18 +1,31 @@
import { ReactNode, useId } from 'react'
+type RenderProps = {
+ inputId: string
+ descriptionId: string
+}
+
type InputProps = {
label: string
- children: (inputId: string) => ReactNode
+ description?: string
+ children: (props: RenderProps) => ReactNode
}
-export const Input = ({ children, label }: InputProps) => {
- const id = useId()
+export const Input = ({ children, label, description }: InputProps) => {
+ const inputId = useId()
+ const descriptionId = useId()
return (
-
+
+
+ {children({ inputId, descriptionId })}
- {children(id)}
+ {description && (
+
+ {description}
+
+ )}
)
}
diff --git a/extension/src/components/TextInput.tsx b/extension/src/components/TextInput.tsx
index 791009a4..92a6c8c8 100644
--- a/extension/src/components/TextInput.tsx
+++ b/extension/src/components/TextInput.tsx
@@ -6,15 +6,17 @@ type TextInputProps = Omit<
'id' | 'type' | 'className'
> & {
label: string
+ description?: string
}
-export const TextInput = ({ label, ...props }: TextInputProps) => (
-
- {(id) => (
+export const TextInput = ({ label, description, ...props }: TextInputProps) => (
+
+ {({ inputId, descriptionId }) => (
)}
diff --git a/extension/src/panel/app-routes/transactions/BaseTransaction.tsx b/extension/src/panel/app-routes/transactions/BaseTransaction.tsx
deleted file mode 100644
index f2ae0d0f..00000000
--- a/extension/src/panel/app-routes/transactions/BaseTransaction.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-import { Box } from '@/components'
-import { PropsWithChildren } from 'react'
-
-export const BaseTransaction = ({
- children,
- value,
-}: PropsWithChildren<{ value: string }>) => (
-
-)
diff --git a/extension/src/panel/app-routes/transactions/DecodedTransaction.tsx b/extension/src/panel/app-routes/transactions/DecodedTransaction.tsx
index 335b4177..e39eec14 100644
--- a/extension/src/panel/app-routes/transactions/DecodedTransaction.tsx
+++ b/extension/src/panel/app-routes/transactions/DecodedTransaction.tsx
@@ -1,6 +1,5 @@
-import { Box } from '@/components'
+import { Box, TextInput } from '@/components'
import { FunctionFragment, Result } from 'ethers'
-import { BaseTransaction } from './BaseTransaction'
interface Props {
functionFragment: FunctionFragment
@@ -14,11 +13,14 @@ export const DecodedTransaction = ({ functionFragment, data }: Props) => {
return (
{functionFragment.inputs.length > 0 && (
-