mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-08 00:29:04 +02:00
0e4682ef89
* Create DS version for Bootstrap Input form elements * Move DS Button Storybook to DS component folder * Use phosphor icons * Add ds-focus-outline mixin * Use math.div GitOrigin-RevId: e50934212ec5949f0f7abc7880eb73933fce2a9b
21 lines
544 B
TypeScript
21 lines
544 B
TypeScript
import { Form } from 'react-bootstrap'
|
|
import FormText from '@/shared/components/form/form-text'
|
|
import { ComponentProps } from 'react'
|
|
|
|
export type FormFeedbackProps = Pick<
|
|
ComponentProps<typeof Form.Control.Feedback>,
|
|
'type' | 'className' | 'children'
|
|
>
|
|
|
|
function DSFormFeedback(props: FormFeedbackProps) {
|
|
return (
|
|
<Form.Control.Feedback {...props}>
|
|
<FormText type={props.type === 'invalid' ? 'error' : 'success'}>
|
|
{props.children}
|
|
</FormText>
|
|
</Form.Control.Feedback>
|
|
)
|
|
}
|
|
|
|
export default DSFormFeedback
|