mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 03:59:01 +08:00
type: fix demo types error (#39059)
This commit is contained in:
parent
4efa3b2896
commit
0a004930d3
@ -1,13 +1,13 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Segmented } from 'antd';
|
||||
|
||||
const Demo = () => {
|
||||
const [foo, setFoo] = useState('AND');
|
||||
const Demo: React.FC = () => {
|
||||
const [foo, setFoo] = useState<string | number>('AND');
|
||||
return (
|
||||
<>
|
||||
<Segmented value={foo} options={['AND', 'OR', 'NOT']} onChange={setFoo} />
|
||||
|
||||
<Segmented value={foo} options={['AND', 'OR', 'NOT']} onChange={(value) => setFoo(value)} />
|
||||
<Segmented value={foo} options={['AND', 'OR', 'NOT']} onChange={setFoo} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user