Skip to content

Commit 28f93fa

Browse files
committed
feat: add @react-login-page/page11 page.
1 parent e4b8643 commit 28f93fa

File tree

20 files changed

+823
-4
lines changed

20 files changed

+823
-4
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,5 +155,12 @@ jobs:
155155
name: 📦 @react-login-page/page10 publish to NPM
156156
continue-on-error: true
157157
working-directory: pages/page10
158+
env:
159+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
160+
161+
- run: npm publish --access public
162+
name: 📦 @react-login-page/page11 publish to NPM
163+
continue-on-error: true
164+
working-directory: pages/page11
158165
env:
159166
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

pages/page10/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,6 @@ Login.InnerBox = InnerBox;
194194
Login.Title = Title;
195195
Login.TitleLogin = TitleLogin;
196196
Login.TitleSignup = TitleSignup;
197-
Login.displayName = 'BaseLoginPage';
197+
Login.displayName = 'LoginPage';
198198

199199
export default Login;

pages/page11/README.md

Lines changed: 348 additions & 0 deletions
Large diffs are not rendered by default.

pages/page11/assets/banner.jpg

80.9 KB
Loading

pages/page11/package.json

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"name": "@react-login-page/page11",
3+
"version": "0.4.14",
4+
"description": "Some `react` login pages, which can be used quickly after installation.",
5+
"homepage": "https://uiwjs.github.io/react-login-page",
6+
"author": "kenny wong <[email protected]>",
7+
"license": "MIT",
8+
"main": "./cjs/index.js",
9+
"module": "./esm/index.js",
10+
"exports": {
11+
".": {
12+
"import": "./esm/index.js",
13+
"require": "./cjs/index.js"
14+
},
15+
"./banner.jpg": "./assets/banner.jpg",
16+
"./README.md": "./README.md",
17+
"./package.json": "./package.json"
18+
},
19+
"scripts": {
20+
"watch": "tsbb watch src/*.tsx --use-babel",
21+
"build": "tsbb build src/*.tsx --use-babel",
22+
"test": "tsbb test --env=jsdom",
23+
"coverage": "tsbb test --env=jsdom --coverage --bail"
24+
},
25+
"repository": {
26+
"type": "git",
27+
"url": "https://github.com/uiwjs/react-login-page.git"
28+
},
29+
"files": [
30+
"README.md",
31+
"src",
32+
"esm",
33+
"cjs"
34+
],
35+
"peerDependencies": {
36+
"@babel/runtime": ">=7.11.0",
37+
"react": ">=16.8.0",
38+
"react-dom": ">=16.8.0"
39+
},
40+
"dependencies": {
41+
"react-login-page": "0.4.14"
42+
},
43+
"keywords": [
44+
"react",
45+
"login",
46+
"login-page",
47+
"login-pages",
48+
"react-login",
49+
"react-login-page",
50+
"editor",
51+
"syntax",
52+
"ide",
53+
"code"
54+
],
55+
"jest": {
56+
"coverageReporters": [
57+
"lcov",
58+
"json-summary"
59+
]
60+
}
61+
}

pages/page11/src/control/Banner.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { PropsWithChildren } from 'react';
2+
import { Block, BlockProps, BlockTagType } from 'react-login-page';
3+
4+
export const Banner = <T extends BlockTagType>(props: PropsWithChildren<Partial<BlockProps<T | 'aside'>>>) => {
5+
const { keyname = 'banner', ...elmProps } = props;
6+
return <Block {...elmProps} keyname={keyname} tagName="aside" />;
7+
};
8+
9+
Banner.displayName = 'Login.Banner';

pages/page11/src/control/Footer.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { Block, BlockProps, BlockTagType } from 'react-login-page';
2+
3+
export const Footer = <Tag extends BlockTagType = 'footer'>(props: BlockProps<Tag | 'footer'>) => {
4+
const { keyname = 'footer', ...elmProps } = props;
5+
return <Block {...elmProps} name={keyname} tagName="footer" />;
6+
};
7+
8+
Footer.displayName = 'Login.Footer';

pages/page11/src/control/Logo.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { PropsWithChildren } from 'react';
2+
import { Block, BlockProps, BlockTagType } from 'react-login-page';
3+
4+
export const Logo = <T extends BlockTagType = 'div'>(props: PropsWithChildren<Partial<BlockProps<T | 'div'>>>) => {
5+
const { keyname = 'logo', ...elmProps } = props;
6+
if (!elmProps.children) {
7+
elmProps.children = '⚛️';
8+
}
9+
return <Block {...elmProps} keyname={keyname} />;
10+
};
11+
12+
Logo.displayName = 'Login.Logo';

pages/page11/src/control/Password.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { FC, useEffect } from 'react';
2+
import { Input, InputProps, useStore } from 'react-login-page';
3+
4+
export interface PasswordProps extends InputProps {
5+
label?: React.ReactNode;
6+
}
7+
8+
export const Password: FC<PasswordProps> = (props) => {
9+
const { keyname = 'password', name, rename, label, ...elmProps } = props;
10+
const nameBase = name || rename || keyname;
11+
const key = (keyname || name) as string;
12+
const { dispatch } = useStore();
13+
useEffect(() => dispatch({ [`$${key}`]: label }), [label]);
14+
15+
return <Input type="password" placeholder="Password" autoComplete="on" {...elmProps} name={nameBase} keyname={key} />;
16+
};
17+
18+
Password.displayName = 'Login.Password';

pages/page11/src/control/Submit.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { FC } from 'react';
2+
import { Button, ButtonProps } from 'react-login-page';
3+
4+
export const Submit: FC<ButtonProps> = (props) => {
5+
const { keyname = 'submit', ...elmProps } = props;
6+
if (!elmProps.children) {
7+
elmProps.children = 'Submit';
8+
}
9+
return <Button type="submit" keyname={keyname} {...elmProps} />;
10+
};
11+
12+
Submit.displayName = 'Login.Submit';

0 commit comments

Comments
 (0)