mirror of
https://github.com/LucasVbr/meeting-app.git
synced 2026-12-05 17:30:50 +00:00
feat(Like / dislike API ): more efficient api + checks and returns if match
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import {
|
||||
Editable,
|
||||
EditablePreview,
|
||||
FormControl,
|
||||
FormHelperText,
|
||||
FormLabel,
|
||||
UseEditableProps,
|
||||
} from "@chakra-ui/react";
|
||||
|
||||
type CustomEditableProps = {
|
||||
id: string;
|
||||
label: string;
|
||||
helperText?: string;
|
||||
} & UseEditableProps;
|
||||
|
||||
export default function CustomEditable(props: CustomEditableProps) {
|
||||
const { label, id, helperText = "", ...UseEditableProps } = props;
|
||||
|
||||
return (
|
||||
<FormControl>
|
||||
<FormLabel as="legend" htmlFor={id}>
|
||||
{label}
|
||||
</FormLabel>
|
||||
<Editable
|
||||
{...UseEditableProps}
|
||||
fontWeight="bold"
|
||||
isDisabled={true}
|
||||
placeholder={"Non renseigné"}
|
||||
color={"gray.500"}
|
||||
>
|
||||
<EditablePreview />
|
||||
</Editable>
|
||||
<FormHelperText>{helperText}</FormHelperText>
|
||||
</FormControl>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user