-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Map AEM fragment data to expected component props in FragmentRender.js (
#1000) * started work on interface to map fragment data to component props * fragment renderer updates * map fragment data to props before passing to component * modify fragment components to work with changes to FragmentRender.js * remove unused imports from FragmentRender.js * add layout-container class to ArticleCTA --------- Co-authored-by: blai0264 <[email protected]>
- Loading branch information
Showing
10 changed files
with
222 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 5 additions & 30 deletions
35
components/fragment_renderer/fragment_components/ArticleCTA.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
components/fragment_renderer/fragment_components/ArticleCTA.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import * as React from "react"; | ||
import ArticleCTA from "./ArticleCTA"; | ||
|
||
export default { | ||
title: "Components/Fragment_Renderer/ArticleCTA", | ||
component: ArticleCTA, | ||
}; | ||
|
||
const Template = (args) => <ArticleCTA {...args} />; | ||
|
||
export const Default = Template.bind({}); | ||
Default.args = { | ||
heading: "This is a heading", | ||
body: "This is a body", | ||
ButtonProps: { | ||
text: "Action Button", | ||
}, | ||
LinkProps: { | ||
id: "privacy-policy", | ||
text: "Review the Privacy Policy", | ||
}, | ||
}; |
29 changes: 3 additions & 26 deletions
29
components/fragment_renderer/fragment_components/BasicTextWithImage.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 7 additions & 18 deletions
25
components/fragment_renderer/fragment_components/Button.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 12 additions & 20 deletions
32
components/fragment_renderer/fragment_components/ImageVerticalLineContent.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.