mirror of
https://github.com/formbricks/formbricks.git
synced 2026-02-05 02:58:36 -06:00
* auto focus on sign up * update PR template * add updatedAt date to survey summary * add animation to Progress, make timer smoother * change button size in question card, auto focus * add transition to js widget, fix auto focus in editor --------- Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
21 lines
655 B
TypeScript
21 lines
655 B
TypeScript
import React from "react";
|
|
|
|
const ProgressComponent = ({ progress, brandColor }) => {
|
|
return (
|
|
<div className="h-1 w-full rounded-full bg-slate-200">
|
|
<div
|
|
className="transition-width h-1 rounded-full duration-500"
|
|
style={{ backgroundColor: brandColor, width: `${Math.floor(progress * 100)}%` }}></div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
ProgressComponent.displayName = "Progress";
|
|
|
|
const Progress = React.memo(ProgressComponent, (prevProps, nextProps) => {
|
|
// Only re-render if progress or brandColor changes
|
|
return prevProps.progress === nextProps.progress && prevProps.brandColor === nextProps.brandColor;
|
|
});
|
|
|
|
export default Progress;
|