Browse Source

Keep content on top

Wrappers are added to layout areas to keep content on top of styled
generated content (for adding backgrounds).
master
TheoryOfNekomata 3 years ago
parent
commit
f5d2a31a67
5 changed files with 17 additions and 2 deletions
  1. +1
    -1
      package.json
  2. +2
    -0
      src/layouts/LeftSidebar/index.tsx
  3. +4
    -0
      src/layouts/LeftSidebarWithMenu/index.tsx
  4. +8
    -1
      src/layouts/RightSidebarStatic/index.tsx
  5. +2
    -0
      src/widgets/TopBar/index.tsx

+ 1
- 1
package.json View File

@@ -1,5 +1,5 @@
{
"version": "0.2.2",
"version": "0.2.3",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",


+ 2
- 0
src/layouts/LeftSidebar/index.tsx View File

@@ -29,6 +29,8 @@ const SidebarOverflow = styled('div')({
height: '100%',
overflow: 'auto',
// overflow: 'overlay',
position: 'relative',
zIndex: 1,
scrollbarWidth: 'none',
'::-webkit-scrollbar': {
display: 'none',


+ 4
- 0
src/layouts/LeftSidebarWithMenu/index.tsx View File

@@ -71,6 +71,8 @@ const SidebarMainOverflow = styled('div')({
overflow: 'auto',
// overflow: 'overlay',
scrollbarWidth: 'none',
position: 'relative',
zIndex: 1,
'::-webkit-scrollbar': {
display: 'none',
},
@@ -117,6 +119,8 @@ const SidebarMenuSize = styled('div')({
height: '100%',
maxWidth: `calc(${configVar('base-width')} * 2)`,
margin: '0 auto',
position: 'relative',
zIndex: 1,
[minWidthFactor(3)]: {
maxWidth: 'none',
marginRight: 0,


+ 8
- 1
src/layouts/RightSidebarStatic/index.tsx View File

@@ -40,6 +40,11 @@ const SidebarBase = styled('div')({
},
})

const SidebarMainContent = styled('div')({
position: 'relative',
zIndex: 1,
})

export const SidebarMainContainer = styled('div')({
padding: '0 1rem',
boxSizing: 'border-box',
@@ -106,7 +111,9 @@ export const Layout: React.FC<Props> = ({
</ContentBase>
<SidebarBase>
<SidebarMainComponent>
{sidebarMain}
<SidebarMainContent>
{sidebarMain}
</SidebarMainContent>
</SidebarMainComponent>
</SidebarBase>
</>


+ 2
- 0
src/widgets/TopBar/index.tsx View File

@@ -38,6 +38,8 @@ const Container = styled('div')({
height: '100%',
display: 'flex',
alignItems: 'center',
position: 'relative',
zIndex: 1,
})

const NarrowContainer = styled(Container)({


Loading…
Cancel
Save