Merge pull request #489 from OpenSignLabs/feat_label

fix: checkbox not embeding in pdf
This commit is contained in:
prafull-opensignlabs
2024-03-14 21:25:18 +05:30
committed by GitHub
2 changed files with 6 additions and 15 deletions
@@ -334,7 +334,6 @@ function PlaceholderType(props) {
return (
<div key={ind} className="flex items-center text-center gap-0.5">
<input
id={data}
style={{
width: props.pos.Width,
display: "flex",
@@ -374,12 +373,7 @@ function PlaceholderType(props) {
}}
/>
{!props.pos.options?.isHideLabel && (
<label
htmlFor={!props.isPlaceholder && data}
className="text-xs mb-0 text-center"
>
{data}
</label>
<label className="text-xs mb-0 text-center">{data}</label>
)}
</div>
);
@@ -714,7 +708,6 @@ function PlaceholderType(props) {
return (
<div key={ind} className="flex items-center text-center gap-0.5">
<input
id={data}
style={{
width: props.pos.Width,
display: "flex",
@@ -735,12 +728,7 @@ function PlaceholderType(props) {
}}
/>
{!props.pos.options?.isHideLabel && (
<label
htmlFor={!props.isPlaceholder && data}
className="text-xs mb-0"
>
{data}
</label>
<label className="text-xs mb-0">{data}</label>
)}
</div>
);
+4 -1
View File
@@ -238,7 +238,10 @@ export const addWidgetOptions = (type) => {
case "stamp":
return defaultOpt;
case "checkbox":
return { defaultOpt, options: { isReadOnly: false, isHideLabel: false } };
return {
...defaultOpt,
options: { isReadOnly: false, isHideLabel: false }
};
case textInputWidget:
return { ...defaultOpt, validation: { type: "text", pattern: "" } };
case "initials":