From f8767f875039d008871e24035910730605b14275 Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Tue, 25 Apr 2023 17:17:17 +0800 Subject: [PATCH] feat(page5): add new login component.. --- .github/workflows/main.yml | 7 + core/src/Block.tsx | 2 +- pages/page3/src/index.tsx | 2 +- pages/page5/README.md | 307 +++++++++++++++++++++++++++ pages/page5/package.json | 52 +++++ pages/page5/src/control/Footer.tsx | 8 + pages/page5/src/control/Logo.tsx | 12 ++ pages/page5/src/control/Password.tsx | 13 ++ pages/page5/src/control/Submit.tsx | 12 ++ pages/page5/src/control/Title.tsx | 12 ++ pages/page5/src/control/Username.tsx | 13 ++ pages/page5/src/index.css | 171 +++++++++++++++ pages/page5/src/index.tsx | 100 +++++++++ pages/page5/tsconfig.json | 8 + website/package.json | 1 + website/src/pages/Example.tsx | 68 ++---- website/src/pages/Examples.tsx | 82 +++++++ website/src/router.tsx | 117 +++------- 18 files changed, 850 insertions(+), 137 deletions(-) create mode 100644 pages/page5/README.md create mode 100644 pages/page5/package.json create mode 100644 pages/page5/src/control/Footer.tsx create mode 100644 pages/page5/src/control/Logo.tsx create mode 100644 pages/page5/src/control/Password.tsx create mode 100644 pages/page5/src/control/Submit.tsx create mode 100644 pages/page5/src/control/Title.tsx create mode 100644 pages/page5/src/control/Username.tsx create mode 100644 pages/page5/src/index.css create mode 100644 pages/page5/src/index.tsx create mode 100644 pages/page5/tsconfig.json create mode 100644 website/src/pages/Examples.tsx diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 257b119..ddf3ecf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -113,5 +113,12 @@ jobs: name: 📦 @react-login-page/page4 publish to NPM continue-on-error: true working-directory: pages/page4 + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - run: npm publish --access public + name: 📦 @react-login-page/page5 publish to NPM + continue-on-error: true + working-directory: pages/page5 env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/core/src/Block.tsx b/core/src/Block.tsx index 6c6c342..b0fd03a 100644 --- a/core/src/Block.tsx +++ b/core/src/Block.tsx @@ -18,7 +18,7 @@ export const Block = (props: PropsWithChildren const { name, visible = true, tagName = 'div', ...elmProps } = props; if (ref.current !== elmProps && name) { ref.current = { ...elmProps }; - const div = visible && elmProps.children ? createElement(tagName, { ...elmProps }, elmProps.children) : null; + const div = visible ? createElement(tagName, { ...elmProps }, elmProps.children) : null; dispatch({ blocks: { ...blocks, [name]: div as unknown as Blocks<'div'> }, }); diff --git a/pages/page3/src/index.tsx b/pages/page3/src/index.tsx index 702cac2..474d27c 100644 --- a/pages/page3/src/index.tsx +++ b/pages/page3/src/index.tsx @@ -29,7 +29,7 @@ const RenderLogin = () => { return (
-