Skip to content

Commit

Permalink
Update default styling of Signature component
Browse files Browse the repository at this point in the history
  • Loading branch information
frozenhelium committed Feb 5, 2025
1 parent 54af044 commit 4032688
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 56 deletions.
5 changes: 5 additions & 0 deletions .changeset/tall-bees-flow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ifrc-go/ui": minor
---

Add printable Signature component
40 changes: 8 additions & 32 deletions app/src/views/DrefApplicationExport/PgaExport/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,38 +166,14 @@ function PgaExport() {
strongLabel
withoutLabelColon
/>
<Signature
label={strings.imminentSignature}
strongLabel
/>
<Signature
label={strings.imminentSignature}
strongLabel
/>
<Signature
label={strings.imminentPrintedSignatory}
strongLabel
/>
<Signature
label={strings.imminentPrintedSignatory}
strongLabel
/>
<Signature
label={strings.imminentTitle}
strongLabel
/>
<Signature
label={strings.imminentTitle}
strongLabel
/>
<Signature
label={strings.imminentDate}
strongLabel
/>
<Signature
label={strings.imminentDate}
strongLabel
/>
<Signature label={strings.imminentSignature} />
<Signature label={strings.imminentSignature} />
<Signature label={strings.imminentPrintedSignatory} />
<Signature label={strings.imminentPrintedSignatory} />
<Signature label={strings.imminentTitle} />
<Signature label={strings.imminentTitle} />
<Signature label={strings.imminentDate} />
<Signature label={strings.imminentDate} />
</div>
</Container>
</div>
Expand Down
22 changes: 4 additions & 18 deletions packages/ui/src/components/printable/Signature/index.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,17 @@
import { _cs } from '@togglecorp/fujs';

import styles from './styles.module.css';

export interface Props {
label: string;
labelClassName?: string;
strongLabel?: boolean;
}

function Signature(props: Props) {
const {
label,
labelClassName,
strongLabel,
} = props;
const { label } = props;

return (
<div className={styles.signedContainer}>
<div className={styles.signaturePlace} />
<div className={styles.signature}>
<div className={styles.signatureSpace} />
<div className={styles.line} />
<div
className={_cs(
styles.label,
strongLabel && styles.strong,
labelClassName,
)}
>
<div className={styles.label}>
{label}
</div>
</div>
Expand Down
10 changes: 4 additions & 6 deletions packages/ui/src/components/printable/Signature/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.signed-container {
.signature-place {
padding: var(--go-ui-spacing-sm);
.signature {
.signature-space {
height: var(--go-ui-spacing-sm);
}

.line {
border: var(--go-ui-width-separator-sm) solid var(--go-ui-color-separator);
}
Expand All @@ -10,9 +11,6 @@
display: flex;
align-items: center;
flex-direction: column;
}

.strong {
color: var(--go-ui-color-black);
font-weight: var(--go-ui-font-weight-semibold);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,12 @@
"namespace": "drefApplicationExport",
"value": "If the National Society has developed contingency plans, or recently carried out PER assessment or readiness check for instance, kindly attached those documents to the request."
},
{
"action": "add",
"key": "plannedInterventionAltText",
"namespace": "drefApplicationExport",
"value": "Planned Intervention Image"
},
{
"action": "add",
"key": "priorityActionsBudget",
Expand Down

0 comments on commit 4032688

Please sign in to comment.