Skip to content

Commit

Permalink
Remove error introducing code
Browse files Browse the repository at this point in the history
  • Loading branch information
wdy01684395 committed Oct 16, 2023
1 parent 797cc23 commit 0d3ece6
Showing 1 changed file with 12 additions and 24 deletions.
36 changes: 12 additions & 24 deletions packages/design/src/select/demo/custom-tag-render.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Select, Tag } from '@oceanbase/design';
import React, { useState } from 'react';
import React from 'react';

const options = ['gold', 'green', 'red', 'cyan'];

Expand All @@ -16,28 +16,16 @@ const tagRender = props => {
);
};

const App: React.FC = () => {
const [theme, setTheme] = useState();
return (
<>
<Select
mode="multiple"
tagRender={tagRender}
defaultValue={['gold', 'cyan']}
style={{ width: '100%' }}
options={options.map(item => ({ label: item, value: item }))}
/>
<Select mode="tags" style={{ width: '100%' }} defaultValue={['test']} />
<Select<'light' | 'dark'>
// defaultValue={DEFAULT_THEME}
style={{ width: 120 }}
onChange={value => setTheme(value)}
>
<Select.Option value="light">白色主题</Select.Option>
<Select.Option value="dark">黑色主题</Select.Option>
</Select>
</>
);
};
const App: React.FC = () => (
<>
<Select
mode="multiple"
tagRender={tagRender}
defaultValue={['gold', 'cyan']}
style={{ width: '100%' }}
options={options.map(item => ({ label: item, value: item }))}
/>
</>
);

export default App;

0 comments on commit 0d3ece6

Please sign in to comment.