import React from 'react'; import { Flex, Input, Typography } from 'antd'; import type { GetProp } from 'antd'; import type { OTPProps } from 'antd/es/input/OTP'; const { Title } = Typography; const App: React.FC = () => { const onChange: GetProp = (text) => { console.log('onChange:', text); }; const sharedProps: OTPProps = { onChange, }; return ( With formatter (Upcase) str.toUpperCase()} {...sharedProps} /> With Disabled With Length (8) With variant With custom display character ); }; export default App;