diff --git a/example/src/index.tsx b/example/src/index.tsx
index c4e39df2..c7db920e 100644
--- a/example/src/index.tsx
+++ b/example/src/index.tsx
@@ -48,7 +48,7 @@ app.frame('/', (context) => {
,
,
,
- status === 'response' && ,
+ status === 'response' && ,
],
}
})
diff --git a/src/index.tsx b/src/index.tsx
index 541f2a1c..36b5521a 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -273,18 +273,18 @@ export class Farc extends Hono {
export type ButtonProps = {
children: string
index?: number | undefined
- type?: 'reset'
+ reset?: true | undefined
value?: string | undefined
}
// TODO: `fc:frame:button:$idx:action` and `fc:frame:button:$idx:target`
Button.__type = 'button'
-export function Button({ children, index = 0, type, value }: ButtonProps) {
+export function Button({ children, index = 0, reset, value }: ButtonProps) {
return (
)
@@ -316,7 +316,7 @@ function getIntentState(
)
const intent = buttonIntents[buttonIndex - 1]
state.buttonValue = intent.props['data-value']
- if (intent.props['data-type'] === 'reset') state.reset = true
+ if (intent.props['data-reset']) state.reset = true
}
return state
}