Skip to content

Commit

Permalink
worked on button
Browse files Browse the repository at this point in the history
  • Loading branch information
LiveDuo committed Nov 8, 2023
1 parent 3aa38a8 commit 6953fe2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/client/vanilla/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,15 @@ const Dialog: React.FC<DialogProps> = ({ open, setOpen, selectedElement }) => {
selectedElement.setAttribute('onclick', source)
selectedElement.setAttribute('type', 'button')
} else if (type === 'submit') {
// TODO update dom element
// selectedElement.setAttribute('onclick', `alert('submit')`)
// selectedElement.setAttribute('type', 'submit')
if (submitAsync) {
// TODO submit with fetch
// selectedElement.setAttribute('onclick', `alert('submit async')`)
// selectedElement.setAttribute('type', 'submit')
} else {
// TODO form submit
// selectedElement.setAttribute('onclick', `alert('submit')`)
// selectedElement.setAttribute('type', 'submit')
}
}
}

Expand Down

0 comments on commit 6953fe2

Please sign in to comment.