test(modal): update modal type tests

This commit is contained in:
Eric Y Liu 2021-07-05 12:36:55 -07:00
commit fce2d42cd7
2 changed files with 5 additions and 2 deletions

View file

@ -10,7 +10,7 @@
let checked = false;
</script>
<ComposedModal open>
<ComposedModal open on:close on:click:button--primary>
<ModalHeader title="Confirm changes" />
<ModalBody hasForm>
<Checkbox labelText="I have reviewed the changes" bind:checked />
@ -19,6 +19,8 @@
primaryButtonText="Proceed"
primaryButtonDisabled="{!checked}"
secondaryButtons="{[{ text: 'Cancel' }, { text: 'Duplicate' }]}"
on:click:button--secondary="{({ detail }) => {}}"
on:click:button--secondary="{({ detail }) => {
console.log(detail);
}}"
/>
</ComposedModal>

View file

@ -16,6 +16,7 @@
on:open
on:close
on:submit
on:click:button--primary
>
<p>Create a new Cloudant database in the US South region.</p>
</Modal>