mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-06 02:38:00 +08:00
16 lines
391 B
TypeScript
16 lines
391 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;
|