Skip to content

Commit 8555c8c

Browse files
committed
feat(unity-react-core): added select tag functionality to headers
UDS-2033
1 parent 84d5b70 commit 8555c8c

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

packages/app-rfi/src/components/appVariants/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const variants = {
7777
CampusProgramHasChoice: validation.CampusProgramHasChoice,
7878
}}
7979
>
80-
<h4>Step 1 of 2</h4>
80+
<div className={'h4'}>Step 1 of 2</div>
8181
<h2>Request information</h2>
8282
<p className="rfi-step1-intro">
8383
To learn more about ASU or a specific program, fill out the form below
@@ -103,7 +103,7 @@ const variants = {
103103
GdprConsent: validation.GdprConsent,
104104
}}
105105
>
106-
<h4>Step 2 of 2</h4>
106+
<div className={'h4'}>Step 2 of 2</div>
107107
<h2>About me</h2>
108108
<EmailAddress autoFocus gaData={gaData2Of2} />
109109
<FirstName gaData={gaData2Of2} />

packages/unity-react-core/src/components/FeedAnatomy/FeedHeader.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,18 @@ const FeedHeader = ({
3434
}) => {
3535
const header = { ...defaultProps.header, ...pHeeder };
3636
const ctaButton = { ...defaultProps.ctaButton, ...pCtaButton };
37+
const HeaderTag = header.tag || "h2";
38+
const isNotH2 = HeaderTag !== "h2";
39+
40+
const headerClassName = `text-${header.color} ${isNotH2 ? "h2" : ""}`.trim();
3741

3842
return (
3943
<div
4044
className="row justify-content-between align-items-center pb-6"
4145
data-testid="feed-header"
4246
>
4347
<div className="col-sm-12 col-md-9">
44-
<h2 className={`text-${header.color}`}>{header.text}</h2>
48+
<HeaderTag className={headerClassName}>{header.text}</HeaderTag>
4549
</div>
4650
<ButtonColumn className="col-sm-12 col-md-3">
4751
<GaEventWrapper

packages/unity-react-core/src/core/types/feed-types.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* @typedef {Object} FeedHeader
44
* @property {"white" | "dark"} [color]
55
* @property {string} [text]
6+
* @property {"h2" | "h3" | "h4" | "div"} [tag]
67
*/
78
/**
89
* @typedef {Object} FeedCtaButton

0 commit comments

Comments
 (0)