mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-01-09 17:57:26 +03:00
18 lines
472 B
TypeScript
18 lines
472 B
TypeScript
|
import { FC, ReactNode } from 'react';
|
||
|
|
||
|
interface LabeledFormGroupProps {
|
||
|
label: ReactNode;
|
||
|
noMargin?: boolean;
|
||
|
className?: string;
|
||
|
labelClassName?: string;
|
||
|
}
|
||
|
|
||
|
export const LabeledFormGroup: FC<LabeledFormGroupProps> = (
|
||
|
{ children, label, className = '', labelClassName = '', noMargin = false },
|
||
|
) => (
|
||
|
<div className={`${className} ${noMargin ? '' : 'mb-3'}`}>
|
||
|
<label className={`form-label ${labelClassName}`}>{label}</label>
|
||
|
{children}
|
||
|
</div>
|
||
|
);
|