Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: flow error #267

Merged
merged 2 commits into from
Mar 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/honest-roses-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@alita/flow': patch
---

fix: div types and reset props
2 changes: 1 addition & 1 deletion packages/flow/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
5 changes: 4 additions & 1 deletion packages/flow/src/components/Content/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import React from 'react';
* </Page>
* ```
*/
const Content: React.FC = ({ children }) => {
const Content: React.FC<
React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
> = ({ children, ...reset }) => {
return (
<div
style={{
Expand All @@ -27,6 +29,7 @@ const Content: React.FC = ({ children }) => {
WebkitOverflowScrolling: 'touch',
overscrollBehaviorY: 'contain',
}}
{...reset}
>
{children}
</div>
Expand Down
5 changes: 4 additions & 1 deletion packages/flow/src/components/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import React from 'react';
* </Page>
* ```
*/
const Footer: React.FC = ({ children }) => {
const Footer: React.FC<
React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
> = ({ children, ...reset }) => {
return (
<div
style={{
Expand All @@ -19,6 +21,7 @@ const Footer: React.FC = ({ children }) => {
order: '1',
width: '100%',
}}
{...reset}
>
{children}
</div>
Expand Down
5 changes: 4 additions & 1 deletion packages/flow/src/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import React from 'react';
* </Page>
* ```
*/
const Header: React.FC = ({ children }) => {
const Header: React.FC<
React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
> = ({ children, ...reset }) => {
return (
<div
style={{
Expand All @@ -19,6 +21,7 @@ const Header: React.FC = ({ children }) => {
order: '-1',
width: '100%',
}}
{...reset}
>
{children}
</div>
Expand Down
5 changes: 4 additions & 1 deletion packages/flow/src/components/Page/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import React from 'react';
* </Page>
* ```
*/
const Page: React.FC = ({ children }) => {
const Page: React.FC<
React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
> = ({ children, ...reset }) => {
return (
<div
style={{
Expand All @@ -26,6 +28,7 @@ const Page: React.FC = ({ children }) => {
overflow: 'hidden',
contain: 'layout size style',
}}
{...reset}
>
{children}
</div>
Expand Down