From c8d32bcd2c54f92056cfaf1bd258807bc28c438c Mon Sep 17 00:00:00 2001 From: xiaohuoni <448627663@qq.com> Date: Mon, 14 Mar 2022 20:10:30 +0800 Subject: [PATCH 1/2] fix: flow error --- packages/flow/package.json | 2 +- packages/flow/src/components/Content/index.tsx | 5 ++++- packages/flow/src/components/Footer/index.tsx | 5 ++++- packages/flow/src/components/Header/index.tsx | 5 ++++- packages/flow/src/components/Page/index.tsx | 5 ++++- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/packages/flow/package.json b/packages/flow/package.json index 5b8a9316..7f52fed8 100644 --- a/packages/flow/package.json +++ b/packages/flow/package.json @@ -1,6 +1,6 @@ { "name": "@alita/flow", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "@alita/flow", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/flow/src/components/Content/index.tsx b/packages/flow/src/components/Content/index.tsx index adedc288..e7454a0f 100644 --- a/packages/flow/src/components/Content/index.tsx +++ b/packages/flow/src/components/Content/index.tsx @@ -9,7 +9,9 @@ import React from 'react'; * * ``` */ -const Content: React.FC = ({ children }) => { +const Content: React.FC< + React.DetailedHTMLProps, HTMLDivElement> +> = ({ children, ...reset }) => { return (
{ WebkitOverflowScrolling: 'touch', overscrollBehaviorY: 'contain', }} + {...reset} > {children}
diff --git a/packages/flow/src/components/Footer/index.tsx b/packages/flow/src/components/Footer/index.tsx index a4899309..07050f6c 100644 --- a/packages/flow/src/components/Footer/index.tsx +++ b/packages/flow/src/components/Footer/index.tsx @@ -9,7 +9,9 @@ import React from 'react'; * * ``` */ -const Footer: React.FC = ({ children }) => { +const Footer: React.FC< + React.DetailedHTMLProps, HTMLDivElement> +> = ({ children, ...reset }) => { return (
{ order: '1', width: '100%', }} + {...reset} > {children}
diff --git a/packages/flow/src/components/Header/index.tsx b/packages/flow/src/components/Header/index.tsx index eebff454..2b3e1794 100644 --- a/packages/flow/src/components/Header/index.tsx +++ b/packages/flow/src/components/Header/index.tsx @@ -9,7 +9,9 @@ import React from 'react'; * * ``` */ -const Header: React.FC = ({ children }) => { +const Header: React.FC< + React.DetailedHTMLProps, HTMLDivElement> +> = ({ children, ...reset }) => { return (
{ order: '-1', width: '100%', }} + {...reset} > {children}
diff --git a/packages/flow/src/components/Page/index.tsx b/packages/flow/src/components/Page/index.tsx index 3fc7e9d2..59acc014 100644 --- a/packages/flow/src/components/Page/index.tsx +++ b/packages/flow/src/components/Page/index.tsx @@ -11,7 +11,9 @@ import React from 'react'; * * ``` */ -const Page: React.FC = ({ children }) => { +const Page: React.FC< + React.DetailedHTMLProps, HTMLDivElement> +> = ({ children, ...reset }) => { return (
{ overflow: 'hidden', contain: 'layout size style', }} + {...reset} > {children}
From b3420fb0022148de14203238ed6f3084a823d49b Mon Sep 17 00:00:00 2001 From: xiaohuoni <448627663@qq.com> Date: Mon, 14 Mar 2022 20:11:50 +0800 Subject: [PATCH 2/2] chore: changeset --- .changeset/honest-roses-pretend.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/honest-roses-pretend.md diff --git a/.changeset/honest-roses-pretend.md b/.changeset/honest-roses-pretend.md new file mode 100644 index 00000000..4d71eb61 --- /dev/null +++ b/.changeset/honest-roses-pretend.md @@ -0,0 +1,5 @@ +--- +'@alita/flow': patch +--- + +fix: div types and reset props