From 88a82878c07a7278fa5e10cf548bde995cae358c Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Thu, 9 Nov 2023 13:18:16 +0800 Subject: [PATCH] doc: Update README.md --- packages/react-collapse/README.md | 62 ------------------------------- 1 file changed, 62 deletions(-) diff --git a/packages/react-collapse/README.md b/packages/react-collapse/README.md index c1521aa64d..7994b48a0a 100644 --- a/packages/react-collapse/README.md +++ b/packages/react-collapse/README.md @@ -7,68 +7,6 @@ Collapse 折叠面板 可以折叠/展开的内容区域。 -```jsx -import { Collapse } from 'uiw'; -// or -import Collapse from '@uiw/react-collapse'; -``` - -```jsx mdx:preview&bg=#fff -import React, { useState } from 'react'; -import { Collapse } from 'uiw'; - -const styl = { - border: '1px solid #efefef', - marginBottom: 10, - //height: 32, - //lineHeight: 32, - padding: 10, -} - -export default function App() { - const [recent, setRecent] = useState([]); - const [list, setList] = useState(["a", "b", "c", "d", "e"]); - const onListClick = (index) => { - const newList = [...list]; - const ls = newList.splice(index, 1); - setRecent([...recent, ls]); - setList(newList); - }; - const onRecentClick = (index) => { - const newRecent = [...recent]; - const ls = newRecent.splice(index, 1); - setList([...list, ls]); - setRecent(newRecent); - }; - return ( -
- {/* */} - - - {recent.map((item) => { - return ( -
- {item} -
- ); - })} -
- - {list.map((item) => { - return ( -
- {item} -
- ); - })} -
-
- {/*
*/} -
- ); -} - - ``` ## 基本用法