mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 12:09:14 +08:00
7e4bca346d
* feat: Segmented value type support generics * fix: type * docs: update demo * test: update snapshots * Update components/segmented/demo/basic.tsx Signed-off-by: afc163 <afc163@gmail.com> * Revert "test: update snapshots" This reverts commit 6f95cd674d73564ba4fbfa4865f94eba14e741d7. --------- Signed-off-by: afc163 <afc163@gmail.com> Co-authored-by: afc163 <afc163@gmail.com>
14 lines
282 B
TypeScript
14 lines
282 B
TypeScript
import React from 'react';
|
|
import { Segmented } from 'antd';
|
|
|
|
const Demo: React.FC = () => (
|
|
<Segmented<string>
|
|
options={['Daily', 'Weekly', 'Monthly', 'Quarterly', 'Yearly']}
|
|
onChange={(value) => {
|
|
console.log(value); // string
|
|
}}
|
|
/>
|
|
);
|
|
|
|
export default Demo;
|