mirror of
https://github.com/formbricks/formbricks.git
synced 2026-02-08 15:49:15 -06:00
* Fix Preview on Delete in Survey Builder * Fix Button Text on light brand color --------- Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
18 lines
664 B
TypeScript
18 lines
664 B
TypeScript
import { cn } from "@/../../packages/lib/cn";
|
|
import { isLight } from "@/lib/utils";
|
|
|
|
function SubmitButton({ question, lastQuestion, brandColor }) {
|
|
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;
|