mirror of
https://github.com/formbricks/formbricks.git
synced 2026-02-04 10:30:00 -06:00
* moved link LinkSurvey to RSC * made some code refactors * made requested changes * ran pnpm build and added configured inactive survey * fixed a build issue * made some code refactors --------- Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
26 lines
921 B
TypeScript
26 lines
921 B
TypeScript
import { cn } from "@/../../packages/lib/cn";
|
|
import { isLight } from "@/lib/utils";
|
|
import { Question } from "@formbricks/types/questions";
|
|
import { TSurveyQuestion } from "@formbricks/types/v1/surveys";
|
|
|
|
type SubmitButtonProps = {
|
|
question: Question | TSurveyQuestion;
|
|
lastQuestion: boolean;
|
|
brandColor: string;
|
|
};
|
|
|
|
function SubmitButton({ question, lastQuestion, brandColor }: SubmitButtonProps) {
|
|
return (
|
|
<button
|
|
type="submit"
|
|
className={cn(
|
|
"flex items-center rounded-md border border-transparent px-3 py-3 text-base font-medium leading-4 text-white shadow-sm hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-slate-500 focus:ring-offset-2",
|
|
isLight(brandColor) ? "text-black" : "text-white"
|
|
)}
|
|
style={{ backgroundColor: brandColor }}>
|
|
{question.buttonLabel || (lastQuestion ? "Finish" : "Next")}
|
|
</button>
|
|
);
|
|
}
|
|
export default SubmitButton;
|