Skip to content

Commit

Permalink
feat: remove modalsize samples
Browse files Browse the repository at this point in the history
  • Loading branch information
demetriusfeijoo committed Dec 31, 2024
1 parent 2bb1b58 commit 4d82b09
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
6 changes: 2 additions & 4 deletions packages/cli/templates/js/src/components.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ function ModalCloseButton() {
},
setup({ container, actions }) {
container.querySelector('.btn-close').addEventListener('click', () => {
actions.setModalOpen(!currentData.isModalOpen, {
width: '50%',
})
actions.setModalOpen(!currentData.isModalOpen)
})
},
update({ container, data }) {
Expand Down Expand Up @@ -116,7 +114,7 @@ function ModalToggle() {
container
.querySelector('.btn-modal-toggle')
.addEventListener('click', () => {
actions.setModalOpen(!currentData.isModalOpen, { width: '50%' })
actions.setModalOpen(!currentData.isModalOpen)
})
},
update({ container, data }) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const ModalToggle: FunctionComponent<{
<button
className="btn w-full"
type="button"
onClick={() => setModalOpen(!isModalOpen, { width: '50%' })}
onClick={() => setModalOpen(!isModalOpen)}
>
{isModalOpen ? 'Close' : 'Open'} modal
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<button
class="btn w-full"
type="button"
@click="() => setModalOpen(!isModalOpen, { width: '50%' })"
@click="() => setModalOpen(!isModalOpen)"
>
{{ isModalOpen ? 'Close' : 'Open' }} modal
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ const props = defineProps<{
<button
class="btn w-full"
type="button"
@click="
() =>
props.setModalOpen(!props.isModalOpen, {
width: '50%',
})
"
@click="() => props.setModalOpen(!props.isModalOpen)"
>
{{ props.isModalOpen ? 'Close' : 'Open' }} modal
</button>
Expand Down

0 comments on commit 4d82b09

Please sign in to comment.