mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-12 23:35:38 +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;
|