Skip to content

Commit c6ad9ad

Browse files
committed
Add type button to buttons in forms.
1 parent 5d9e642 commit c6ad9ad

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

app/create-card/create-card-form.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ export default function CreateCardForm() {
205205
name={CreateCardFormNames.Color}
206206
watch={watch}
207207
/>
208-
<button className="btn btn-primary btn-square mt-9">
208+
<button className="btn btn-primary btn-square mt-9" type="button">
209209
<IconPalette className="w-6 h-6" />
210210
</button>
211211
</div>
@@ -254,13 +254,15 @@ export default function CreateCardForm() {
254254
<button
255255
className="btn btn-square btn-ghost"
256256
onClick={() => cameraModalRef.current?.close()}
257+
type="button"
257258
>
258259
<IconX className="w-6 h-6" />
259260
</button>
260261
<h3 className="font-bold text-lg">Scan your code!</h3>
261262
{devices.length > 1 ? (
262263
<button
263264
className="btn btn-square btn-ghost"
265+
type="button"
264266
onClick={() => {
265267
dispatch({
266268
type: CreateCardFormActionTypes.TOGGLE_ACTIVE_DEVICE,

app/ui/dropdown-field.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,12 @@ export function DropdownField<T extends FieldValues, U = string>({
5555
{currentOption.label}
5656
</div>
5757
) : (
58-
<button tabIndex={0} role="button" className="w-full" />
58+
<button
59+
tabIndex={0}
60+
role="button"
61+
className="w-full"
62+
type="button"
63+
/>
5964
)}
6065
</div>
6166
<ul

0 commit comments

Comments
 (0)