mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-05 09:49:57 +08:00
16 lines
393 B
TypeScript
16 lines
393 B
TypeScript
import React, { useState } from 'react';
|
|
import { Segmented } from 'antd';
|
|
|
|
const Demo = () => {
|
|
const [foo, setFoo] = useState('AND');
|
|
return (
|
|
<>
|
|
<Segmented value={foo} options={['AND', 'OR', 'NOT']} onChange={setFoo} />
|
|
|
|
<Segmented value={foo} options={['AND', 'OR', 'NOT']} onChange={(value) => setFoo(value)} />
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default Demo;
|