Skip to content
This repository has been archived by the owner on Dec 28, 2022. It is now read-only.

ZConfirm #12

Open
2 tasks
yash-deepsource opened this issue May 16, 2022 Discussed in #10 · 0 comments
Open
2 tasks

ZConfirm #12

yash-deepsource opened this issue May 16, 2022 Discussed in #10 · 0 comments
Assignees
Labels
Feature Request Feature requests for Zeal

Comments

@yash-deepsource
Copy link
Contributor

Description

To create a confirm component.

Tasks

  • PLT-4646: Create ZConfirm component logic
  • PLT-4647: Create ZConfirm Design spec

Discussed in #10

Originally posted by yash-deepsource May 13, 2022

Description

ZConfirm component that allows warning the users about a whether they really want to do a particular action or not.

More information on them can be found on MDN.

Components

ZConfirm

  • Renders a confirm dialog.

Props

Prop Default Description
open: Boolean 'false' Whether the confirm dialog is open or not.
unmount: Boolean 'true' Whether to unmount the dialog from the DOM when ZConfirm is closed.

Styling

TODO

Events

Event name Emits Description
close state: Boolean Emitted when the confirm dialog is closed.

Preview

TODO

Code example

<script setup lang="ts">
  import { ref } from 'vue'

  const onClose = (newState) => {
    isOpen.value = newState
  }
  const isOpen = ref(false)
</script>
<template>
  <button @click="isOpen = !isOpen"> Toggle </button>
  <z-confirm :open="isOpen" @close="onClose">
    Test
  </z-confirm>
</template>
@yash-deepsource yash-deepsource added RFC RFCs around how Zeal is built Draft Currently in draft stage, not completed labels May 16, 2022
@yash-deepsource yash-deepsource self-assigned this May 16, 2022
@yash-deepsource yash-deepsource added Feature Request Feature requests for Zeal and removed RFC RFCs around how Zeal is built Draft Currently in draft stage, not completed labels May 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature Request Feature requests for Zeal
Projects
None yet
Development

No branches or pull requests

1 participant