-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: expose containerProps in StudioHeader [FC-0062] #529
Changes from all commits
ce107bf
e2249b2
35c2040
d7c69a2
10c3e12
89c949d
06bfcc7
ccee347
61243f4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,10 +30,10 @@ const NavDropdownMenu = ({ | |
|
||
NavDropdownMenu.propTypes = { | ||
id: PropTypes.string.isRequired, | ||
buttonTitle: PropTypes.string.isRequired, | ||
buttonTitle: PropTypes.node.isRequired, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not related to this feature. This is a fly-by fix of a console warning. Let me know if I should create a different PR for this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed other places here: 06bfcc7 |
||
items: PropTypes.arrayOf(PropTypes.shape({ | ||
href: PropTypes.string, | ||
title: PropTypes.string, | ||
title: PropTypes.node, | ||
})).isRequired, | ||
}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ ensureConfig([ | |
], 'Studio Header component'); | ||
|
||
const StudioHeader = ({ | ||
number, org, title, isHiddenMainMenu, mainMenuDropdowns, outlineLink, searchButtonAction, | ||
number, org, title, containerProps, isHiddenMainMenu, mainMenuDropdowns, outlineLink, searchButtonAction, | ||
}) => { | ||
const { authenticatedUser, config } = useContext(AppContext); | ||
const props = { | ||
|
@@ -25,6 +25,7 @@ const StudioHeader = ({ | |
number, | ||
org, | ||
title, | ||
containerProps, | ||
username: authenticatedUser?.username, | ||
isAdmin: authenticatedUser?.administrator, | ||
authenticatedUserAvatar: authenticatedUser?.avatar, | ||
|
@@ -53,13 +54,14 @@ StudioHeader.propTypes = { | |
number: PropTypes.string, | ||
org: PropTypes.string, | ||
title: PropTypes.string.isRequired, | ||
containerProps: HeaderBody.propTypes.containerProps, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed here: e2249b2 |
||
isHiddenMainMenu: PropTypes.bool, | ||
mainMenuDropdowns: PropTypes.arrayOf(PropTypes.shape({ | ||
id: PropTypes.string, | ||
buttonTitle: PropTypes.string, | ||
buttonTitle: PropTypes.node, | ||
items: PropTypes.arrayOf(PropTypes.shape({ | ||
href: PropTypes.string, | ||
title: PropTypes.string, | ||
title: PropTypes.node, | ||
})), | ||
})), | ||
outlineLink: PropTypes.string, | ||
|
@@ -69,6 +71,7 @@ StudioHeader.propTypes = { | |
StudioHeader.defaultProps = { | ||
number: '', | ||
org: '', | ||
containerProps: {}, | ||
isHiddenMainMenu: false, | ||
mainMenuDropdowns: [], | ||
outlineLink: null, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to this feature. This is a fly-by fix of a console warning. Let me know if I should create a different PR for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing these! Fewer warnings is always good.