27 lines
705 B
TypeScript
27 lines
705 B
TypeScript
|
|
import str from "@/hooks/use-string";
|
||
|
|
import BtnOptionnalLinkWithTooltip from "./BtnOptionnalLinkWithTooltip";
|
||
|
|
import useTrans from "@/hooks/use-translations";
|
||
|
|
|
||
|
|
const SubmitButton = ({
|
||
|
|
isInDialog = false,
|
||
|
|
modelTrans
|
||
|
|
}: {
|
||
|
|
isInDialog?: boolean,
|
||
|
|
modelTrans: string
|
||
|
|
}) => {
|
||
|
|
return (
|
||
|
|
<BtnOptionnalLinkWithTooltip
|
||
|
|
content={str(useTrans("crud.actions.save")).ucFirst().value()}
|
||
|
|
tooltipContent={useTrans("crud.helpers.save_model", {
|
||
|
|
params: {
|
||
|
|
model: modelTrans,
|
||
|
|
},
|
||
|
|
})}
|
||
|
|
type={isInDialog ? "button" : "submit"}
|
||
|
|
size="default"
|
||
|
|
/>
|
||
|
|
)
|
||
|
|
}
|
||
|
|
|
||
|
|
export default SubmitButton;
|