Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
juliancwirko committed Jul 31, 2022
1 parent 1a65dc0 commit f89e3e8
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
4 changes: 2 additions & 2 deletions components/tools/ActionButton.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Box, BoxProps } from '@chakra-ui/react';
import { FC, useCallback } from 'react';
import { FC, useCallback, PropsWithChildren } from 'react';

interface ActionButtonProps extends BoxProps {
onClick: () => void;
isFullWidth?: boolean;
disabled?: boolean;
}

export const ActionButton: FC<ActionButtonProps> = ({
export const ActionButton: FC<PropsWithChildren<ActionButtonProps>> = ({
children,
onClick,
isFullWidth = false,
Expand Down
4 changes: 2 additions & 2 deletions components/tools/Authenticated.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FC, ReactElement } from 'react';
import { FC, ReactElement, PropsWithChildren } from 'react';
import { Spinner, Flex } from '@chakra-ui/react';
import { useLoggingIn } from '../../hooks/auth/useLoggingIn';

Expand All @@ -8,7 +8,7 @@ interface AuthenticatedProps {
spinnerCentered?: boolean;
}

export const Authenticated: FC<AuthenticatedProps> = ({
export const Authenticated: FC<PropsWithChildren<AuthenticatedProps>> = ({
children,
fallback = null,
noSpinner = false,
Expand Down
12 changes: 9 additions & 3 deletions components/ui/CardWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { Flex, Box, chakra, FlexProps, BoxProps } from '@chakra-ui/react';
import { FC } from 'react';
import { FC, PropsWithChildren } from 'react';

export const FlexCardWrapper: FC<FlexProps> = ({ children, ...props }) => {
export const FlexCardWrapper: FC<PropsWithChildren<FlexProps>> = ({
children,
...props
}) => {
const Wrapper = chakra(Flex, {
baseStyle: {
backgroundColor: 'dappTemplate.dark.darker',
Expand All @@ -18,7 +21,10 @@ export const FlexCardWrapper: FC<FlexProps> = ({ children, ...props }) => {
return <Wrapper>{children}</Wrapper>;
};

export const CardWrapper: FC<BoxProps> = ({ children, ...props }) => {
export const CardWrapper: FC<PropsWithChildren<BoxProps>> = ({
children,
...props
}) => {
const Wrapper = chakra(Box, {
baseStyle: {
backgroundColor: 'dappTemplate.dark.darker',
Expand Down
4 changes: 2 additions & 2 deletions components/ui/HeaderMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { FC } from 'react';
import { FC, PropsWithChildren } from 'react';
import { Box } from '@chakra-ui/react';
import { Logo } from './Logo';

export const HeaderMenu: FC = ({ children }) => {
export const HeaderMenu: FC<PropsWithChildren> = ({ children }) => {
return (
<Box
display="flex"
Expand Down
4 changes: 2 additions & 2 deletions components/ui/MainLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Container, Box } from '@chakra-ui/react';
import { FC, memo } from 'react';
import { FC, memo, PropsWithChildren } from 'react';
import { MetaHead, MetaHeadProps } from './MetaHead';
import { Footer } from './Footer';

export const MainLayout: FC<MetaHeadProps> = memo(
export const MainLayout: FC<PropsWithChildren<MetaHeadProps>> = memo(
({ children, metaTitle, metaDescription, metaImage, metaUrl }) => {
return (
<>
Expand Down

0 comments on commit f89e3e8

Please sign in to comment.