From 31150ad8dd6dfbe1685d3827016e3a3554a3af46 Mon Sep 17 00:00:00 2001 From: CooperHash <2597905281@qq.com> Date: Sun, 10 Sep 2023 15:54:02 +0800 Subject: [PATCH] feat: update accordion docs installation part --- .../src/content/docs/components/accordion.md | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/apps/www/src/content/docs/components/accordion.md b/apps/www/src/content/docs/components/accordion.md index e664a141..2a6a0587 100644 --- a/apps/www/src/content/docs/components/accordion.md +++ b/apps/www/src/content/docs/components/accordion.md @@ -16,6 +16,32 @@ primitive: https://www.radix-vue.com/components/accordion.html npx shadcn-vue@latest add accordion ``` +```bash{5-22} +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: ['./**/*.vue'], + theme: { + extend: { + keyframes: { + slideDown: { + from: { height: 0 }, + to: { height: 'var(--radix-accordion-content-height)' }, + }, + slideUp: { + from: { height: 'var(--radix-accordion-content-height)' }, + to: { height: 0 }, + }, + }, + animation: { + slideDown: 'slideDown 300ms cubic-bezier(0.87, 0, 0.13, 1)', + slideUp: 'slideUp 300ms cubic-bezier(0.87, 0, 0.13, 1)', + }, + }, + }, + plugins: [], +} +``` + 1. Install `radix-vue`: @@ -31,7 +57,7 @@ npm install radix-vue ```vue @@ -42,4 +68,4 @@ import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@/ -``` \ No newline at end of file +```