Selaa lähdekoodia

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 vuotta sitten
vanhempi
commit
f5d2a31a67
5 muutettua tiedostoa jossa 17 lisäystä ja 2 poistoa
  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 Näytä tiedosto

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


+ 2
- 0
src/layouts/LeftSidebar/index.tsx Näytä tiedosto

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


+ 4
- 0
src/layouts/LeftSidebarWithMenu/index.tsx Näytä tiedosto

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


+ 8
- 1
src/layouts/RightSidebarStatic/index.tsx Näytä tiedosto

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


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

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


+ 2
- 0
src/widgets/TopBar/index.tsx Näytä tiedosto

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


const NarrowContainer = styled(Container)({ const NarrowContainer = styled(Container)({


Ladataan…
Peruuta
Tallenna