Skip to content

Static preheader + sticky panel header #2679

Answered by inomdzhon
darthwade asked this question in Q&A
Discussion options

You must be logged in to vote

Oh, sorry... I missed this one

Unfortunately, current time no right way to do it, because we use position: fixed for pining headers (see FixedLayout).

Hm, sure you can do this:

Code (it's part of the example that I've wrote above)
const StaticPreHeader = () => (
  <div
    style={{
      position: "relative",
      zIndex: 100,
      width: "100%",
      height: 56,
      backgroundColor: "steelblue"
    }}
  >
    <div
      style={{
        position: "fixed",
        top: 0,
        left: 0,
        textAlign: "center",
        zIndex: 100
      }}
    >
      Preheader
    </div>
  </div>
);

/* ... */

<SplitLayout
  header={
    <React.Fragment>
      <StaticPreHeader />
      <Pane…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by SevereCloud
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #2668 on June 07, 2022 14:41.