mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 11:08:45 +08:00
16 lines
402 B
TypeScript
16 lines
402 B
TypeScript
import React, { useState } from 'react';
|
|
import { Segmented } from 'antd';
|
|
|
|
const Demo: React.FC = () => {
|
|
const [foo, setFoo] = useState<string | number>('AND');
|
|
return (
|
|
<>
|
|
<Segmented value={foo} options={['AND', 'OR', 'NOT']} onChange={setFoo} />
|
|
|
|
<Segmented value={foo} options={['AND', 'OR', 'NOT']} onChange={setFoo} />
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default Demo;
|