@bloom-housing/ui-components 5.1.1-alpha.19 → 5.1.1-alpha.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,6 +11,11 @@ const ProgressNavItem = (props: {
11
11
  label: string
12
12
  mounted: boolean
13
13
  style: ProgressNavStyle
14
+ strings?: {
15
+ screenReaderCompleted?: string
16
+ screenReaderNotCompleted?: string
17
+ screenReaderTitle?: string
18
+ }
14
19
  }) => {
15
20
  let bgColor = "is-disabled"
16
21
  if (props.mounted) {
@@ -23,9 +28,17 @@ const ProgressNavItem = (props: {
23
28
 
24
29
  const srTextBuilder = (): string | React.ReactFragment => {
25
30
  if (props.section < props.currentPageSection) {
26
- return <span className="sr-only">{t("progressNav.completed")}</span>
31
+ return (
32
+ <span className="sr-only">
33
+ {props.strings?.screenReaderCompleted ?? t("progressNav.completed")}
34
+ </span>
35
+ )
27
36
  } else if (props.section > props.currentPageSection) {
28
- return <span className="sr-only">{t("progressNav.notCompleted")}</span>
37
+ return (
38
+ <span className="sr-only">
39
+ {props.strings?.screenReaderNotCompleted ?? t("progressNav.notCompleted")}
40
+ </span>
41
+ )
29
42
  } else {
30
43
  return ""
31
44
  }
@@ -50,12 +63,17 @@ const ProgressNav = (props: {
50
63
  labels: string[]
51
64
  mounted: boolean
52
65
  style?: ProgressNavStyle
66
+ strings?: {
67
+ screenReaderHeading?: string
68
+ }
53
69
  }) => {
54
70
  let navClasses = "progress-nav"
55
71
  if (props.style === "bar") navClasses += " progress-nav__bar"
56
72
  return (
57
73
  <div aria-label="progress">
58
- <h2 className="sr-only">{t("progressNav.srHeading")}</h2>
74
+ <h2 className="sr-only">
75
+ {props.strings?.screenReaderHeading ?? t("progressNav.srHeading")}
76
+ </h2>
59
77
  <ol className={!props.mounted ? "invisible" : navClasses}>
60
78
  {props.labels.map((label, i) => (
61
79
  <ProgressNavItem
@@ -0,0 +1,41 @@
1
+ import { Canvas, Story, ArgsTable } from "@storybook/addon-docs"
2
+ import { AlertBox } from "./AlertBox"
3
+
4
+ # Alert Box
5
+
6
+ The alert box component displays a themed notice with text.
7
+
8
+ <Canvas>
9
+ <Story id="notifications-alert-box" />
10
+ </Canvas>
11
+
12
+ ## Component Properties
13
+
14
+ <ArgsTable of={AlertBox} />
15
+
16
+ ## Theming Variables
17
+
18
+ <Canvas>
19
+ <Story id="notifications-alert-box--style-overrides" />
20
+ </Canvas>
21
+
22
+ You can apply CSS variables to the `.alert-box` selector to customize the appearance of the component.
23
+
24
+ | Name | Type | Description | Default |
25
+ | ----------------------------------- | ----------- | ------------------------------------- | ----------------------------- |
26
+ | `--vertical-padding` | Size | Vertical internal padding | `--bloom-s3` |
27
+ | `--horizontal-padding` | Size | Horizontal internal padding | `--bloom-s4` |
28
+ | `--background-color` | Color | Background color | `--bloom-color-primary-light` |
29
+ | `--alert-background-color` | Color | Alert theme background color | `--bloom-color-alert-light` |
30
+ | `--alert-invert-background-color` | Color | Alert invert theme background color | `--bloom-color-alert` |
31
+ | `--notice-background-color` | Color | Notice theme background color | `--bloom-color-primary-light` |
32
+ | `--notice-invert-background-color` | Color | Notice invert theme background color | `--bloom-color-primary` |
33
+ | `--success-background-color` | Color | Success theme background color | `--bloom-color-success-light` |
34
+ | `--success-invert-background-color` | Color | Success invert theme background color | `--bloom-color-success` |
35
+ | `--warn-background-color` | Color | Warn theme background color | `--bloom-color-warn-light` |
36
+ | `--warn-invert-background-color` | Color | Warn invert theme background color | `--bloom-color-warn` |
37
+ | `--text-color` | Color | Content text color | `--bloom-color-gray-900` |
38
+ | `--close-icon-color` | Color | Close icon color | `--bloom-color-gray-900` |
39
+ | `--font-weight` | Font weight | Content text font weight | `600` |
40
+ | `--max-width` | Size | Max width | `--bloom-width-5xl` |
41
+ | `--line-height` | Line height | Content text line height | `1.375` |
@@ -1,86 +1,108 @@
1
1
  .alert-box {
2
- @apply relative;
3
- @apply py-3;
4
- @apply px-4;
5
- @apply leading-snug;
6
- @apply flex;
7
- @apply items-center;
2
+ --vertical-padding: var(--bloom-s3);
3
+ --horizontal-padding: var(--bloom-s4);
4
+ --background-color: var(--bloom-color-primary-light);
5
+ --alert-background-color: var(--bloom-color-alert-light);
6
+ --alert-invert-background-color: var(--bloom-color-alert);
7
+ --notice-background-color: var(--bloom-color-primary-light);
8
+ --notice-invert-background-color: var(--bloom-color-primary);
9
+ --success-background-color: var(--bloom-color-success-light);
10
+ --success-invert-background-color: var(--bloom-color-success);
11
+ --warn-background-color: var(--bloom-color-warn-light);
12
+ --warn-invert-background-color: var(--bloom-color-warn);
13
+ --text-color: var(--bloom-color-gray-900);
14
+ --close-icon-color: var(--bloom-color-gray-900);
15
+ --font-weight: 600;
16
+ --max-width: var(--bloom-width-5xl);
17
+ --line-height: 1.375;
18
+
19
+ padding: var(--vertical-padding) var(--horizontal-padding);
20
+ background-color: var(--background-color);
21
+ color: var(--text-color);
22
+ font-weight: var(--font-weight);
23
+ position: relative;
24
+ display: flex;
25
+ align-items: center;
26
+ line-height: var(--line-height);
8
27
 
9
28
  .alert-box_inner {
10
- @apply m-auto;
11
- @apply max-w-5xl;
12
- @apply px-4;
13
- @apply flex-1;
14
- @apply flex;
15
- @apply items-center;
29
+ margin: auto;
30
+ max-width: var(--max-width);
31
+ padding-right: var(--horizontal-padding);
32
+ padding-left: var(--horizontal-padding);
33
+ flex: 1;
34
+ display: flex;
35
+ align-items: center;
16
36
  }
17
37
 
18
38
  &.narrow {
19
- padding-top: 0.35rem;
20
- padding-bottom: 0.35rem;
39
+ padding-top: var(--bloom-s1_5);
40
+ padding-bottom: var(--bloom-s1_5);
21
41
  }
22
42
 
23
- // Inverts color scheme of alert
24
43
  &.invert {
25
- @apply text-white;
26
-
27
- .close {
28
- @apply text-white;
44
+ color: var(--bloom-color-white);
45
+ a {
46
+ color: var(--bloom-color-white);
47
+ text-decoration: underline;
29
48
  }
30
49
  }
31
50
 
32
51
  &.alert {
33
- @apply bg-alert-light;
52
+ background-color: var(--alert-background-color);
34
53
 
35
54
  &.invert {
36
- @apply bg-alert;
55
+ background-color: var(--alert-invert-background-color);
37
56
  }
38
57
  }
39
58
 
40
59
  &.primary {
41
- @apply bg-primary-light;
60
+ background-color: var(--notice-background-color);
42
61
 
43
62
  &.invert {
44
- @apply bg-primary;
63
+ background-color: var(--notice-invert-background-color);
45
64
  }
46
65
  }
47
66
 
48
67
  &.success {
49
- @apply bg-success-light;
68
+ background-color: var(--success-background-color);
50
69
 
51
70
  &.invert {
52
- @apply bg-success;
71
+ background-color: var(--success-invert-background-color);
53
72
  }
54
73
  }
55
74
 
56
75
  &.warn {
57
- @apply bg-warn-light;
58
-
59
- &.invert {
60
- @apply bg-warn;
61
- }
76
+ background-color: var(--warn-background-color);
62
77
  }
63
78
  }
64
79
 
65
80
  .alert-box__head {
66
- @apply flex justify-between;
67
- @apply w-full;
81
+ display: flex;
82
+ justify-content: space-between;
83
+ width: 100%;
68
84
  }
69
85
 
70
86
  .alert-box__title {
71
- @apply flex justify-between;
87
+ display: flex;
88
+ justify-content: space-between;
89
+ align-items: center;
72
90
  }
73
91
 
74
92
  .alert-box__body {
75
- @apply ml-2;
76
- @apply font-semibold;
77
- @apply text-tiny;
93
+ font-weight: var(--font-weight);
94
+ font-size: var(--bloom-font-size-tiny);
78
95
  }
79
96
 
80
97
  .alert-box__close {
81
- @apply text-3xl;
82
- right: 1rem;
83
- @apply ml-3;
84
- @apply p-0;
85
- line-height: 1rem;
98
+ font-size: var(--bloom-font-size-3xl);
99
+ right: var(--horizontal-padding);
100
+ margin-left: var(--blom-s3);
101
+ padding: 0;
102
+ line-height: var(--bloom-s4);
103
+ color: var(--close-icon-color);
104
+ }
105
+
106
+ .alert-box__icon {
107
+ margin-right: var(--bloom-s3);
86
108
  }
@@ -7,6 +7,7 @@ import "./AlertBox.scss"
7
7
 
8
8
  export interface AlertBoxProps {
9
9
  type?: AlertTypes
10
+ customIcon?: IconTypes
10
11
  closeable?: boolean
11
12
  onClose?: () => void
12
13
  children: ReactNode
@@ -20,6 +21,7 @@ const icons: { [k in AlertTypes]: IconTypes } = {
20
21
  alert: "warning",
21
22
  notice: "info",
22
23
  success: "check",
24
+ warn: "warning",
23
25
  }
24
26
 
25
27
  const AlertBox = (props: AlertBoxProps) => {
@@ -28,7 +30,7 @@ const AlertBox = (props: AlertBoxProps) => {
28
30
 
29
31
  const classNames = [
30
32
  "alert-box",
31
- colorClasses[props.type || "alert"],
33
+ colorClasses[props.type || ""],
32
34
  ...(props.inverted ? ["invert"] : []),
33
35
  ...(props.className ? [props.className] : []),
34
36
  ...(props.boundToLayoutWidth ? [] : ["fullWidth"]),
@@ -47,14 +49,16 @@ const AlertBox = (props: AlertBoxProps) => {
47
49
  <>
48
50
  <div className="alert-box__head">
49
51
  <div className="alert-box__title">
50
- <span className="alert-box__icon">
51
- <Icon
52
- size="medium"
53
- symbol={icons[props.type || "alert"]}
54
- fill={props.inverted ? IconFillColors.white : undefined}
55
- ariaHidden={true}
56
- />
57
- </span>
52
+ {(props.type || props.customIcon) && (
53
+ <span className="alert-box__icon">
54
+ <Icon
55
+ size="medium"
56
+ symbol={props.type ? icons[props.type] : props.customIcon ?? "warning"}
57
+ fill={props.inverted ? IconFillColors.white : undefined}
58
+ ariaHidden={true}
59
+ />
60
+ </span>
61
+ )}
58
62
  <span className="alert-box__body">
59
63
  {typeof props.children === "string" ? <p>{props.children}</p> : props.children}
60
64
  </span>
@@ -8,6 +8,10 @@ import "./StatusMessage.scss"
8
8
  export interface StatusMessagesProps {
9
9
  lastTimestamp?: string
10
10
  children?: React.ReactNode
11
+ strings?: {
12
+ lastUpdated?: string
13
+ statusHistory?: string
14
+ }
11
15
  }
12
16
 
13
17
  export const StatusMessages = (props: StatusMessagesProps) => {
@@ -17,7 +21,7 @@ export const StatusMessages = (props: StatusMessagesProps) => {
17
21
  {props.lastTimestamp && (
18
22
  <li className="status-message">
19
23
  <div className="status-message__note text-center">
20
- {t("t.lastUpdated")}: {props.lastTimestamp}
24
+ {props.strings?.lastUpdated ?? t("t.lastUpdated")}: {props.lastTimestamp}
21
25
  </div>
22
26
  </li>
23
27
  )}
@@ -26,7 +30,9 @@ export const StatusMessages = (props: StatusMessagesProps) => {
26
30
  } else {
27
31
  return (
28
32
  <>
29
- <h3 className="status-messages__title">{t("t.statusHistory")}</h3>
33
+ <h3 className="status-messages__title">
34
+ {props.strings?.statusHistory ?? t("t.statusHistory")}
35
+ </h3>
30
36
  <ul className="status-messages">{props.children}</ul>
31
37
  </>
32
38
  )
@@ -2,6 +2,7 @@ export const colorClasses = {
2
2
  alert: "alert",
3
3
  notice: "primary",
4
4
  success: "success",
5
+ warn: "warn",
5
6
  }
6
7
 
7
8
  export type AlertTypes = keyof typeof colorClasses
@@ -4,7 +4,14 @@ import { Icon } from "../icons/Icon"
4
4
  import { t } from "../helpers/translator"
5
5
  import "./ApplicationTimeline.scss"
6
6
 
7
- const ApplicationTimeline = () => (
7
+ export interface ApplicationTimelineProps {
8
+ strings?: {
9
+ applicationReceived?: string
10
+ applicationsClosed?: string
11
+ applicationsRanked?: string
12
+ }
13
+ }
14
+ const ApplicationTimeline = (props: ApplicationTimelineProps) => (
8
15
  <ul
9
16
  className="progress-nav application-timeline"
10
17
  aria-label="Steps of processing your application"
@@ -14,17 +21,20 @@ const ApplicationTimeline = () => (
14
21
  <Icon symbol="check" size="base" />
15
22
  </span>
16
23
  <Markdown className="font-bold" options={{ disableParsingRawHTML: true }}>
17
- {t("application.review.confirmation.applicationReceived")}
24
+ {props.strings?.applicationReceived ??
25
+ t("application.review.confirmation.applicationReceived")}
18
26
  </Markdown>
19
27
  </li>
20
28
  <li className="progress-nav__item is-disabled">
21
29
  <Markdown options={{ disableParsingRawHTML: true }}>
22
- {t("application.review.confirmation.applicationsClosed")}
30
+ {props.strings?.applicationsClosed ??
31
+ t("application.review.confirmation.applicationsClosed")}
23
32
  </Markdown>
24
33
  </li>
25
34
  <li className="progress-nav__item is-disabled">
26
35
  <Markdown options={{ disableParsingRawHTML: true }}>
27
- {t("application.review.confirmation.applicationsRanked")}
36
+ {props.strings?.applicationsRanked ??
37
+ t("application.review.confirmation.applicationsRanked")}
28
38
  </Markdown>
29
39
  </li>
30
40
  </ul>
@@ -1,13 +1,13 @@
1
1
  import React, { useState } from "react"
2
- import { t } from "../../../helpers/translator"
2
+ import Markdown from "markdown-to-jsx"
3
3
  import { Button } from "../../../actions/Button"
4
4
  import { LinkButton } from "../../../actions/LinkButton"
5
5
  import { AppearanceStyleType } from "../../../global/AppearanceTypes"
6
6
  import { Address } from "../../../helpers/MultiLineAddress"
7
- import { ContactAddress } from "./ContactAddress"
8
- import { OrDivider } from "./OrDivider"
9
7
  import { Heading } from "../../../headers/Heading"
10
- import Markdown from "markdown-to-jsx"
8
+ import { t } from "../../../helpers/translator"
9
+ import { OrDivider } from "./OrDivider"
10
+ import { ContactAddress } from "./ContactAddress"
11
11
 
12
12
  export interface PaperApplication {
13
13
  fileURL: string
@@ -33,6 +33,16 @@ export interface ApplicationsProps {
33
33
  postmarkedApplicationsReceivedByDate?: string
34
34
  /** Whether or not to hide actionable application buttons */
35
35
  preview?: boolean
36
+ strings?: {
37
+ applicationsOpenInFuture?: string
38
+ applyOnline?: string
39
+ downloadApplication?: string
40
+ getAPaperApplication?: string
41
+ getDirections?: string
42
+ howToApply?: string
43
+ officeHoursHeading?: string
44
+ pickUpApplication?: string
45
+ }
36
46
  }
37
47
  /** Displays information regarding how to apply, including an online application link button, paper application downloads, and a paper application pickup address */
38
48
  const GetApplication = (props: ApplicationsProps) => {
@@ -46,19 +56,22 @@ const GetApplication = (props: ApplicationsProps) => {
46
56
 
47
57
  return (
48
58
  <section className="aside-block" data-test-id="get-application-section">
49
- <h2 className="text-caps-underline">{t("listings.apply.howToApply")}</h2>
59
+ <h2 className="text-caps-underline">
60
+ {props.strings?.howToApply ?? t("listings.apply.howToApply")}
61
+ </h2>
50
62
  {!props.applicationsOpen && (
51
63
  <p className="mb-5 text-gray-700">
52
- {t("listings.apply.applicationWillBeAvailableOn", {
53
- openDate: props.applicationsOpenDate,
54
- })}
64
+ {props.strings?.applicationsOpenInFuture ??
65
+ t("listings.apply.applicationWillBeAvailableOn", {
66
+ openDate: props.applicationsOpenDate,
67
+ })}
55
68
  </p>
56
69
  )}
57
70
  {props.applicationsOpen && props.onlineApplicationURL && (
58
71
  <>
59
72
  {props.preview ? (
60
73
  <Button disabled className="w-full mb-2" data-test-id={"listing-view-apply-button"}>
61
- {t("listings.apply.applyOnline")}
74
+ {props.strings?.applyOnline ?? t("listings.apply.applyOnline")}
62
75
  </Button>
63
76
  ) : (
64
77
  <LinkButton
@@ -67,7 +80,7 @@ const GetApplication = (props: ApplicationsProps) => {
67
80
  href={props.onlineApplicationURL}
68
81
  dataTestId={"listing-view-apply-button"}
69
82
  >
70
- {t("listings.apply.applyOnline")}
83
+ {props.strings?.applyOnline ?? t("listings.apply.applyOnline")}
71
84
  </LinkButton>
72
85
  )}
73
86
  </>
@@ -76,7 +89,9 @@ const GetApplication = (props: ApplicationsProps) => {
76
89
  {props.applicationsOpen && props.paperMethod && !!props.paperApplications?.length && (
77
90
  <>
78
91
  {props.onlineApplicationURL && <OrDivider bgColor="white" />}
79
- <div className="text-serif-lg">{t("listings.apply.getAPaperApplication")}</div>
92
+ <div className="text-serif-lg">
93
+ {props.strings?.getAPaperApplication ?? t("listings.apply.getAPaperApplication")}
94
+ </div>
80
95
  <Button
81
96
  styleType={
82
97
  !props.preview && props.onlineApplicationURL ? AppearanceStyleType.primary : undefined
@@ -85,7 +100,7 @@ const GetApplication = (props: ApplicationsProps) => {
85
100
  onClick={toggleDownload}
86
101
  disabled={props.preview}
87
102
  >
88
- {t("listings.apply.downloadApplication")}
103
+ {props.strings?.downloadApplication ?? t("listings.apply.downloadApplication")}
89
104
  </Button>
90
105
  </>
91
106
  )}
@@ -94,7 +109,7 @@ const GetApplication = (props: ApplicationsProps) => {
94
109
  <p key={index} className="text-center mt-2 mb-4 text-sm">
95
110
  <a
96
111
  href={paperApplication.fileURL}
97
- title={t("listings.apply.downloadApplication")}
112
+ title={props.strings?.downloadApplication ?? t("listings.apply.downloadApplication")}
98
113
  target="_blank"
99
114
  >
100
115
  {paperApplication.languageString}
@@ -107,16 +122,16 @@ const GetApplication = (props: ApplicationsProps) => {
107
122
  <OrDivider bgColor="white" />
108
123
  )}
109
124
  <Heading priority={3} style={"sidebarSubHeader"}>
110
- {t("listings.apply.pickUpAnApplication")}
125
+ {props.strings?.pickUpApplication ?? t("listings.apply.pickUpAnApplication")}
111
126
  </Heading>
112
127
  <ContactAddress
113
128
  address={props.applicationPickUpAddress}
114
- mapString={t("t.getDirections")}
129
+ mapString={props.strings?.getDirections ?? t("t.getDirections")}
115
130
  />
116
131
  {props.applicationPickUpAddressOfficeHours && (
117
132
  <>
118
133
  <Heading priority={3} style={"sidebarSubHeader"}>
119
- {t("leasingAgent.officeHours")}
134
+ {props.strings?.officeHoursHeading ?? t("leasingAgent.officeHours")}
120
135
  </Heading>
121
136
  <p className="text-gray-800 text-tiny markdown">
122
137
  <Markdown
@@ -4,6 +4,9 @@ import dayjs from "dayjs"
4
4
 
5
5
  interface ListingUpdatedProps {
6
6
  listingUpdated: Date
7
+ strings?: {
8
+ listingUpdated?: string
9
+ }
7
10
  }
8
11
 
9
12
  const ListingUpdated = (props: ListingUpdatedProps) => {
@@ -11,7 +14,8 @@ const ListingUpdated = (props: ListingUpdatedProps) => {
11
14
  return (
12
15
  <section className="aside-block">
13
16
  <p className="text-tiny text-gray-800">
14
- {`${t("listings.listingUpdated")}: ${dayjs(listingUpdated).format("MMMM DD, YYYY")}`}
17
+ {props?.strings?.listingUpdated ??
18
+ `${t("listings.listingUpdated")}: ${dayjs(listingUpdated).format("MMMM DD, YYYY")}`}
15
19
  </p>
16
20
  </section>
17
21
  )
@@ -1,9 +1,11 @@
1
1
  import * as React from "react"
2
2
  import { t } from "../../../helpers/translator"
3
3
 
4
- const OrDivider = (props: { bgColor: string }) => (
4
+ const OrDivider = (props: { bgColor: string; strings?: { orString?: string } }) => (
5
5
  <div className="aside-block__divider">
6
- <span className={`bg-${props.bgColor} aside-block__conjunction`}>{t("t.or")}</span>
6
+ <span className={`bg-${props.bgColor} aside-block__conjunction`}>
7
+ {props.strings?.orString ?? t("t.or")}
8
+ </span>
7
9
  </div>
8
10
  )
9
11
 
@@ -5,7 +5,10 @@ import { Icon, IconFillColors } from "../../../icons/Icon"
5
5
  interface ReferralApplicationProps {
6
6
  description: string
7
7
  phoneNumber: string
8
- title: string
8
+ strings: {
9
+ call?: string
10
+ title: string
11
+ }
9
12
  }
10
13
 
11
14
  const ReferralApplication = (props: ReferralApplicationProps) => {
@@ -13,11 +16,11 @@ const ReferralApplication = (props: ReferralApplicationProps) => {
13
16
 
14
17
  return (
15
18
  <section className="aside-block">
16
- <h2 className="text-caps-underline">{props.title}</h2>
19
+ <h2 className="text-caps-underline">{props.strings.title}</h2>
17
20
  <p>
18
21
  <a href={linkedPhoneNumber}>
19
- <Icon symbol="phone" size="medium" fill={IconFillColors.primary} /> {t("t.call")}{" "}
20
- {props.phoneNumber}
22
+ <Icon symbol="phone" size="medium" fill={IconFillColors.primary} />{" "}
23
+ {props.strings.call ?? t("t.call")} {props.phoneNumber}
21
24
  </a>
22
25
  </p>
23
26
  <p className="text-tiny mt-4 text-gray-800">{props.description}</p>
@@ -5,13 +5,18 @@ type DownloadLotteryResultsProps = {
5
5
  resultsDate?: string
6
6
  buttonText?: string
7
7
  pdfURL?: string
8
+ strings?: {
9
+ sectionHeader?: string
10
+ }
8
11
  }
9
12
 
10
13
  const DownloadLotteryResults = (props: DownloadLotteryResultsProps) => {
11
14
  if (!props.pdfURL) return null
12
15
  return (
13
16
  <section className="aside-block text-center">
14
- <h2 className="text-caps pb-4">{t("listings.lotteryResults.header")}</h2>
17
+ <h2 className="text-caps pb-4">
18
+ {props.strings?.sectionHeader ?? t("listings.lotteryResults.header")}
19
+ </h2>
15
20
  {props.resultsDate && (
16
21
  <p className="uppercase text-gray-800 text-tiny font-semibold pb-4">{props.resultsDate}</p>
17
22
  )}
@@ -23,6 +23,10 @@ export interface AgTableProps {
23
23
  sort?: AgTableSort
24
24
  headerContent?: React.ReactNode
25
25
  className?: string
26
+ strings?: {
27
+ filter?: string
28
+ searchError?: string
29
+ }
26
30
  }
27
31
 
28
32
  export interface AgTablePagination {
@@ -89,6 +93,7 @@ const AgTable = ({
89
93
  headerContent,
90
94
  data,
91
95
  config: { gridComponents, columns, totalItemsLabel },
96
+ strings,
92
97
  }: AgTableProps) => {
93
98
  // local storage key with column state
94
99
  const columnStateLsKey = `column-state_${id}`
@@ -189,15 +194,17 @@ const AgTable = ({
189
194
  <Field
190
195
  dataTestId="ag-search-input"
191
196
  name="filter-input"
192
- label={t("t.filter")}
197
+ label={strings?.filter ?? t("t.filter")}
193
198
  readerOnly={true}
194
199
  register={register}
195
- placeholder={t("t.filter")}
200
+ placeholder={strings?.filter ?? t("t.filter")}
196
201
  />
197
202
  </div>
198
203
  <div className="w-full md:w-auto mt-2 mb-2 md:mb-0">
199
204
  {!validSearch && (
200
- <AlertBox type="notice">{t("applications.table.searchError")}</AlertBox>
205
+ <AlertBox type="notice">
206
+ {strings?.searchError ?? t("applications.table.searchError")}
207
+ </AlertBox>
201
208
  )}
202
209
  </div>
203
210
  </div>