ant-design/components/segmented/demo/basic.tsx
章鱼怪 7e4bca346d
feat: Segmented value type support generics (#47091)
* 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>
2024-01-27 20:19:10 +08:00

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;