소스 검색

Republish package, fix left sidebar layout

Use `@theoryofnekomata` scope to publish package on different
registries.

The "More" logic in LeftSidebarWithMenu logic has been updated to only
show when more sidebar items are visible.
master
부모
커밋
f6a9a56abb
4개의 변경된 파일53개의 추가작업 그리고 16개의 파일을 삭제
  1. +6
    -0
      .npmignore
  2. +22
    -4
      package.json
  3. +0
    -0
      src/index.ts
  4. +25
    -12
      src/layouts/LeftSidebarWithMenu/index.tsx

+ 6
- 0
.npmignore 파일 보기

@@ -0,0 +1,6 @@
example/
node_modules/
src/
.editorconfig
tsconfig.json
yarn.lock

+ 22
- 4
package.json 파일 보기

@@ -1,12 +1,30 @@
{
"version": "0.1.1",
"version": "0.2.0",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"files": [
"dist",
"src"
"dist"
],
"publishing": {
"github": {
"repository": "https://github.com/TheoryOfNekomata/viewfinder.git",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
},
"master": {
"repository": "https://code.modal.sh/TheoryOfNekomata/viewfinder.git",
"publishConfig": {
"registry": "https://js.pack.modal.sh"
}
},
"npm": {
"publishConfig": {
"registry": "https://registry.npmjs.com"
}
}
},
"engines": {
"node": ">=10"
},
@@ -28,7 +46,7 @@
"pre-commit": "tsdx lint"
}
},
"name": "@tesseract-design/viewfinder",
"name": "@theoryofnekomata/viewfinder",
"description": "Layout scaffolding for Web apps.",
"author": "TheoryOfNekomata <allan.crisostomo@outlook.com>",
"module": "dist/viewfinder.esm.js",


src/index.tsx → src/index.ts 파일 보기


+ 25
- 12
src/layouts/LeftSidebarWithMenu/index.tsx 파일 보기

@@ -296,7 +296,7 @@ export type MenuItem = BaseMenuItem & {

type Props = {
brand?: React.ReactNode,
sidebarMain: React.ReactChild,
sidebarMain?: React.ReactChild,
sidebarMainOpen?: boolean,
sidebarMenuItems: MenuItem[],
moreItemsOpen?: boolean,
@@ -353,7 +353,7 @@ export const Layout: React.FC<Props> = ({
<TopBar
wide
brand={brand}
menuLink={menuLink}
menuLink={sidebarMain ? menuLink : undefined}
userLink={userLink}
>
{topBarCenter}
@@ -404,13 +404,21 @@ export const Layout: React.FC<Props> = ({
</MoreSecondarySidebarMenuGroup>
</MoreItemsScroll>
</MoreItemsComponent>
<MoreToggleSidebarMenuItem>
<SidebarMenuItem>
<LinkComponent
{...moreLinkMenuItem}
/>
</SidebarMenuItem>
</MoreToggleSidebarMenuItem>
{
(
morePrimarySidebarMenuItems.length > 0
|| moreSecondarySidebarMenuItems.length > 0
)
&& (
<MoreToggleSidebarMenuItem>
<SidebarMenuItem>
<LinkComponent
{...moreLinkMenuItem}
/>
</SidebarMenuItem>
</MoreToggleSidebarMenuItem>
)
}
{
visibleSecondarySidebarMenuItems.length > 0
&& (
@@ -429,9 +437,14 @@ export const Layout: React.FC<Props> = ({
}
</SidebarMenuSize>
</SidebarMenu>
<SidebarMainComponent>
{sidebarMain}
</SidebarMainComponent>
{
(sidebarMain as unknown)
&& (
<SidebarMainComponent>
{sidebarMain}
</SidebarMainComponent>
)
}
</SidebarBase>
<ContentBase>
{children}


불러오는 중...
취소
저장