mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +08:00
docs: fix Rate demo type for strict mode (#46520)
* docs: fix Rate demo type for strict mode * Apply suggestions from code review Co-authored-by: lijianan <574980606@qq.com> Signed-off-by: afc163 <afc163@gmail.com> --------- Signed-off-by: afc163 <afc163@gmail.com> Co-authored-by: lijianan <574980606@qq.com>
This commit is contained in:
parent
3825cbca54
commit
b3956a9ba2
@ -12,9 +12,9 @@ const customIcons: Record<number, React.ReactNode> = {
|
||||
|
||||
const App: React.FC = () => (
|
||||
<>
|
||||
<Rate defaultValue={2} character={({ index }: { index: number }) => index + 1} />
|
||||
<Rate defaultValue={2} character={({ index = 0 }) => index + 1} />
|
||||
<br />
|
||||
<Rate defaultValue={3} character={({ index }: { index: number }) => customIcons[index + 1]} />
|
||||
<Rate defaultValue={3} character={({ index = 0 }) => customIcons[index + 1]} />
|
||||
</>
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user