mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-21 04:48:02 +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;
|