Skip to content

Commit 87c67c4

Browse files
fix: allow text provided to component with default fallback
1 parent a563b5a commit 87c67c4

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

src/components/footer/FooterAbout.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ export interface FooterAboutProps
77
extends FooterPartsPrimitiveProps<HTMLDivElement> {
88
entityLink?: string;
99
entityName?: string;
10+
entityText?: string;
1011
}
1112

1213
const FooterAbout = (props: React.PropsWithChildren<FooterAboutProps>) => {
13-
const { className, children, entityLink, entityName, ...rest } = props;
14+
const { className, children, entityLink, entityName, entityText, ...rest } = props;
1415
if (children) {
1516
<div {...rest} className={className}>
1617
{props.children}
@@ -27,7 +28,7 @@ const FooterAbout = (props: React.PropsWithChildren<FooterAboutProps>) => {
2728
),
2829
)}
2930
>
30-
Built with <span>🧡</span> by the{" "}
31+
{entityText ?? "Built with 🧡 by the "}{" "}
3132
<a
3233
href={entityLink ?? "https://bitcoindevs.xyz/"}
3334
target="_blank"

src/components/footer/FooterFeedback.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ import clsx from "clsx";
66
export interface FooterFeedbackProps
77
extends FooterPartsPrimitiveProps<HTMLDivElement> {
88
feedbackLink: string;
9+
enitityText?: string;
10+
entityCtaText?: string;
911
}
1012

1113
const FooterFeedback = (
1214
props: React.PropsWithChildren<FooterFeedbackProps>,
1315
) => {
14-
const { className, children, feedbackLink, ...rest } = props;
16+
const { className, children, feedbackLink, enitityText="We'd love to hear your feedback on this project?", entityCtaText="Give feedback", ...rest } = props;
1517
if (children) {
1618
<div {...rest} className={props.className}>
1719
{props.children}
@@ -27,14 +29,14 @@ const FooterFeedback = (
2729
),
2830
)}
2931
>
30-
<span>We&apos;d love to hear your feedback on this project?</span>
32+
<span>{enitityText}</span>
3133
<a
3234
href={feedbackLink}
3335
target="_blank"
3436
rel="noreferrer"
3537
className="leading-none w-fit min-w-fit mx-auto text-base font-medium md:font-semibold py-4 px-5 rounded-[10px] text-[#FAFAFA] dark:text-[#292929] bg-[#292929] dark:bg-[#FAFAFA]"
3638
>
37-
Give Feedback
39+
{entityCtaText}
3840
</a>
3941
</div>
4042
);

src/components/footer/FooterPublic.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ import clsx from "clsx";
66
export interface FooterPublicProps
77
extends FooterPartsPrimitiveProps<HTMLAnchorElement> {
88
dashboardLink: string;
9+
entityText?: string;
910
}
1011

1112
const FooterPublic = ({
1213
className,
1314
dashboardLink,
15+
entityText = "View our public visitor count",
1416
...rest
1517
}: FooterPublicProps) => {
1618
return (
@@ -26,7 +28,7 @@ const FooterPublic = ({
2628
)}
2729
{...rest}
2830
>
29-
View our public visitor count
31+
{entityText}
3032
</a>
3133
);
3234
};

0 commit comments

Comments
 (0)