Skip to content

Commit

Permalink
feat: add interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
ialexanderbrito committed Apr 6, 2022
1 parent 046e95b commit 7df070c
Showing 1 changed file with 40 additions and 4 deletions.
44 changes: 40 additions & 4 deletions src/types/IComponents.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import { ReactChild, ReactFragment, ReactPortal, SetStateAction } from 'react';

import { ClienteMetadata, UserMetadata } from './IContext';

/* eslint-disable no-unused-vars */
export interface ButtonProps {
type: 'button' | 'submit' | 'reset';
Expand All @@ -12,11 +16,7 @@ export interface ButtonGoogleProps {
}

export interface HeaderProps {
name?: string;
profile?: string;
avatar?: string;
logo?: boolean;
default?: boolean;
back?: boolean;
}

Expand All @@ -42,3 +42,39 @@ export type OverlayProps = {
children: React.ReactNode;
calendar?: boolean;
};

export interface NavItemProps {
children?: React.ReactNode;
icon: React.ReactNode;
onClick?: () => void;
}

export interface NavBarProps {
children: React.ReactNode;
logo?: React.ReactNode;
back?: boolean;
}

export interface DropdownItemProps {
link?: string;
goToMenu?: SetStateAction<string>;
leftIcon?: boolean | ReactChild | ReactFragment | ReactPortal;
children?: boolean | ReactChild | ReactFragment | ReactPortal;
rightIcon?: boolean | ReactChild | ReactFragment | ReactPortal;
onClick?: () => void;
logout?: boolean;
}

export type CardBarbeiroProps = {
barbeiro: UserMetadata | undefined;
onClick: () => void;
};

export type CardClienteProps = {
cliente: ClienteMetadata | undefined;
onClick?: () => void;
};

export interface FloatingButtonProps {
onClick?: () => void;
}

0 comments on commit 7df070c

Please sign in to comment.