From a57fb7e370292b3adcd33c08e97b881044d25bc8 Mon Sep 17 00:00:00 2001 From: khairulhaaziq Date: Fri, 30 Jun 2023 18:39:55 +0800 Subject: [PATCH] add first demo --- docs/components/content/AlertDialogDemo.vue | 61 +++ docs/components/content/ComponentExample.vue | 26 + docs/components/content/MyButton.vue | 3 + .../content/PaginationExampleBasic.vue | 8 + docs/content/3.components/alert-dialog.md | 133 +++-- .../3.components/{avatar.mdx => avatar.md} | 0 docs/content/3.components/toolbar.md | 503 ------------------ docs/nuxt.config.ts | 3 +- docs/package.json | 4 + docs/tailwind.config.js | 55 ++ pnpm-lock.yaml | 371 ++++++++++++- 11 files changed, 626 insertions(+), 541 deletions(-) create mode 100644 docs/components/content/AlertDialogDemo.vue create mode 100644 docs/components/content/ComponentExample.vue create mode 100644 docs/components/content/MyButton.vue create mode 100644 docs/components/content/PaginationExampleBasic.vue rename docs/content/3.components/{avatar.mdx => avatar.md} (100%) delete mode 100644 docs/content/3.components/toolbar.md create mode 100644 docs/tailwind.config.js diff --git a/docs/components/content/AlertDialogDemo.vue b/docs/components/content/AlertDialogDemo.vue new file mode 100644 index 000000000..0e238fc0f --- /dev/null +++ b/docs/components/content/AlertDialogDemo.vue @@ -0,0 +1,61 @@ + + + diff --git a/docs/components/content/ComponentExample.vue b/docs/components/content/ComponentExample.vue new file mode 100644 index 000000000..184481c3a --- /dev/null +++ b/docs/components/content/ComponentExample.vue @@ -0,0 +1,26 @@ + + + \ No newline at end of file diff --git a/docs/components/content/MyButton.vue b/docs/components/content/MyButton.vue new file mode 100644 index 000000000..9a98bd79c --- /dev/null +++ b/docs/components/content/MyButton.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/docs/components/content/PaginationExampleBasic.vue b/docs/components/content/PaginationExampleBasic.vue new file mode 100644 index 000000000..da5a04b74 --- /dev/null +++ b/docs/components/content/PaginationExampleBasic.vue @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/docs/content/3.components/alert-dialog.md b/docs/content/3.components/alert-dialog.md index 78467d83c..acc0eb377 100644 --- a/docs/content/3.components/alert-dialog.md +++ b/docs/content/3.components/alert-dialog.md @@ -7,28 +7,84 @@ aria: https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog # Alert Dialog - A modal dialog that interrupts the user with important content and expects a response. - - - - - - - - - - Manages screen reader announcements with Title and{' '} - Description components. - , - 'Esc closes the component automatically.', - ]} -/> + +::code-group +::code-block{label="Preview" preview} + :alert-dialog-demo +:: +```vue [Code] + + + +``` +:: + +## Features + +::list{type="success"} +- Focus is automatically trapped. +- Can be controlled or uncontrolled. +- Manages screen reader announcements with `Title` and + `Description` components. +- Esc closes the component automatically. +:: ## Installation @@ -42,23 +98,25 @@ npm install @radix-ui/react-alert-dialog Import all parts and piece them together. -```jsx +```vue + + +