mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +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