mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 13:09:40 +08:00
11 lines
295 B
TypeScript
11 lines
295 B
TypeScript
|
import React, { useState } from 'react';
|
||
|
import { Segmented } from 'antd';
|
||
|
|
||
|
const Demo: React.FC = () => {
|
||
|
const [value, setValue] = useState<string | number>('Map');
|
||
|
|
||
|
return <Segmented options={['Map', 'Transit', 'Satellite']} value={value} onChange={setValue} />;
|
||
|
};
|
||
|
|
||
|
export default Demo;
|