Skip to content

Commit f550746

Browse files
committed
Implements #5165
1 parent 3e45cd7 commit f550746

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

__tests__/shared/components/GUIKit/TextInput/__snapshots__/index.jsx.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ exports[`Default render 1`] = `
99
defaultValue=""
1010
onBlur={[Function]}
1111
onChange={[Function]}
12+
onKeyPress={[Function]}
1213
placeholder=""
1314
type="text"
1415
/>

src/shared/components/Contentful/PasswordScreen/index.jsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default class PasswordScreen extends React.Component {
4343
authorized, errorMsg, inputVal,
4444
} = this.state;
4545
const {
46-
viewPortId, preview, spaceName, environment, baseUrl, title, btnText,
46+
viewPortId, preview, spaceName, environment, baseUrl, title, btnText, content,
4747
} = this.props;
4848
return authorized ? (
4949
<Viewport
@@ -71,6 +71,17 @@ export default class PasswordScreen extends React.Component {
7171
<button type="button" styleName="submit" onClick={this.onSubmit} disabled={!inputVal}>{btnText}</button>
7272
</div>
7373
</div>
74+
{
75+
content ? (
76+
<Viewport
77+
id={content.sys.id}
78+
preview={preview}
79+
spaceName={spaceName}
80+
environment={environment}
81+
baseUrl={baseUrl}
82+
/>
83+
) : null
84+
}
7485
</div>
7586
);
7687
}
@@ -83,6 +94,7 @@ PasswordScreen.defaultProps = {
8394
baseUrl: '',
8495
title: 'GET ACCESS WITH PASSWORD',
8596
btnText: 'SUBMIT',
97+
content: null,
8698
};
8799

88100
PasswordScreen.propTypes = {
@@ -94,4 +106,5 @@ PasswordScreen.propTypes = {
94106
baseUrl: PT.string,
95107
title: PT.string,
96108
btnText: PT.string,
109+
content: PT.shape(),
97110
};

src/shared/components/Contentful/Route.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ function ChildRoutesLoader(props) {
7272
baseUrl={url}
7373
title={fields.passwordScreenTitle}
7474
btnText={fields.passwordScreenButtonText}
75+
content={fields.passwordScreenContent}
7576
/>
7677
)
7778
) : <Error404 />

0 commit comments

Comments
 (0)