diff --git a/packages/design/src/button/demo/dropdown.tsx b/packages/design/src/button/demo/dropdown.tsx new file mode 100644 index 000000000..81542bc5a --- /dev/null +++ b/packages/design/src/button/demo/dropdown.tsx @@ -0,0 +1,46 @@ +import React from 'react'; +import { Dropdown, Space } from '@oceanbase/design'; +import { DownOutlined } from '@oceanbase/icons'; + +const items = [ + { + key: '1', + label: '1st item', + }, + { + key: '2', + label: '2nd item', + }, + { + key: '3', + label: '3rd item', + }, +]; + +const App: React.FC = () => ( + + { + console.log('click', e); + }, + }} + > + Dropdown + + { + console.log('click', e); + }, + }} + icon={} + > + Dropdown + + +); + +export default App; diff --git a/packages/design/src/button/demo/icon.tsx b/packages/design/src/button/demo/icon.tsx new file mode 100644 index 000000000..9a3a0de4b --- /dev/null +++ b/packages/design/src/button/demo/icon.tsx @@ -0,0 +1,35 @@ +import React, { useState } from 'react'; +import { PlusOutlined } from '@oceanbase/icons'; +import { Button, Divider, Radio, Space } from '@oceanbase/design'; + +const App: React.FC = () => { + const [position, setPosition] = useState<'start' | 'end'>('end'); + + return ( + <> + + setPosition(e.target.value)}> + start + end + + + + Preview + + + + + +