This repository has been archived by the owner on Jan 5, 2023. It is now read-only.
Replies: 1 comment 6 replies
-
Agree with having a separate I would rethink the "left" vs "right" approach. Having individual props for help, user icon, etc might also not be a bad idea but maybe we could combine those into smaller groups rather than just one big "right" part. As for the "center" part, I think that should be handled by Maybe something like: type HeaderProps = {
appIcon: React.ReactNode;
appName?: React.ReactNode;
buttons?: React.ReactNode[]; // pass `HeaderButton`
actions?: React.ReactNode; // pass notifications icon, help icon, etc
userIcon?: React.ReactNode; // pass `UserIcon`
moreOptions?: React.ReactNode[]; // pass `MenuItem`s
children?: React.ReactNode;
...
} Using |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm looking at creating the Header component out of the Header iTwinUI-css (which is still in progress at the moment).
I'm wondering at which extent we expect such a component to control what it can be used with ?
Header
For example, current demo of header have this:
iui-application
)iui-icon
),iui-divider
),iui-header-button
, optionallyiui-detailed
,iui-active
)iui-chevron
).Left part
Application is quite simple, just not sure if we allow anything for icon and always tag
iui-icon
to whatever we are given, or we restrict toSVG
?We should probably have a component for
HeaderButton
for Project and iModel button, as some application might want to build other flavor of these (Plant button, Asset button, and so on), however, should we recieve an array of those buttons and force a chevron in between, or just leave everything after the divider to the user and let them put chevrons as they see fit (leaving likely to have applications that will use chevrons, straight lines, no dividers...) ?Right part
To which extent do we want to enforce the standards ? We can either again, leave that to the users to put whatever they want in there, and "document" that a user icon with iui-user-icon will update the transition and size, or we fix the content, Help, User icon and More likely have MenuItems attached, depending on the application, but we likely want these to be always the same order/icons for every application so we have some standard...
Beta Was this translation helpful? Give feedback.
All reactions