1.0.4 • Published 2 years ago
block-otp v1.0.4
Highlights
- Easy to use
- Fully customizable
- React hook first
- Separate logic and ui
Usage
Here is a quick example to get you started:
import { FC } from 'react'
import { BaseBlockOTP, IBaseBlockOTPProps } from 'block-otp'
export const BlockOTP: FC<IBaseBlockOTPProps> = props => (
<BaseBlockOTP className="block-otp-default" {...props} />
)
You can also use built-in default component:
import { FC } from 'react'
import { BlockOTP, IBaseBlockOTPProps } from 'block-otp'
export const YourComponent: FC<IBaseBlockOTPProps> = ({
children,
...restProps
}) => (
<section>
<BlockOTP {...restProps} />
{children}
</section>
)
Documentation
Please check more examples here Storybook