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