Skip to content

Commit

Permalink
Added modal overlays.
Browse files Browse the repository at this point in the history
  • Loading branch information
thachp committed Nov 8, 2021
1 parent e318a7e commit 768665c
Show file tree
Hide file tree
Showing 37 changed files with 196 additions and 103 deletions.
1 change: 0 additions & 1 deletion lib/components/Slide.over.js.map

This file was deleted.

1 change: 0 additions & 1 deletion lib/components/Top.over.js.map

This file was deleted.

4 changes: 2 additions & 2 deletions lib/components/fields/FileUpload.field.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as React from "react";
import * as Rd from "react-dropzone";
import * as Rhf from "react-hook-form";
import { FieldValues, UseFormReturn } from "react-hook-form";
export interface FileUploadFieldProps {
formRef: Rhf.UseFormReturn<Rhf.FieldValues>;
formRef: UseFormReturn<FieldValues>;
name: string;
label: string;
preview?: {
Expand Down
4 changes: 2 additions & 2 deletions lib/components/fields/Input.field.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react";
import * as Rhf from "react-hook-form";
import { FieldValues, UseFormReturn } from "react-hook-form";
export interface InputFieldProps extends React.InputHTMLAttributes<HTMLInputElement> {
formRef: Rhf.UseFormReturn<Rhf.FieldValues>;
formRef: UseFormReturn<FieldValues>;
name: string;
label: string;
disabled?: boolean;
Expand Down
6 changes: 3 additions & 3 deletions lib/components/fields/ListItems.field.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import * as Rhf from "react-hook-form";
import { FieldValues, UseFormReturn } from "react-hook-form";
export interface LinkItem {
label: string;
url: string;
Expand All @@ -10,7 +10,7 @@ export interface ResourceItem {
items: Array<LinkItem>;
}
export interface ListItemsFieldProps extends React.HTMLAttributes<HTMLDivElement> {
formRef: Rhf.UseFormReturn<Rhf.FieldValues>;
formRef: UseFormReturn<FieldValues>;
name: string;
label?: string;
max?: number;
Expand All @@ -25,7 +25,7 @@ export interface ListItemsFieldDispatch {
onRemove?: (index: number) => void;
}
export interface ItemFieldProps extends React.FieldsetHTMLAttributes<HTMLFieldSetElement> {
formRef: Rhf.UseFormReturn<any>;
formRef: UseFormReturn<FieldValues>;
itemClasses?: string;
index?: number;
name: string;
Expand Down
4 changes: 2 additions & 2 deletions lib/components/fields/ListItems.field.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/components/fields/ListItems.field.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions lib/components/fields/RadioGroup.field.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference types="react" />
import * as Rhf from "react-hook-form";
import { FieldValues, UseFormReturn } from "react-hook-form";
export interface RadioGroupFieldProps {
formRef: Rhf.UseFormReturn<Rhf.FieldValues>;
formRef: UseFormReturn<FieldValues>;
disabled?: boolean;
name: string;
heading: string;
Expand All @@ -14,7 +14,7 @@ export interface RadioGroupFieldProps {
}>;
}
export interface RadioGroupFieldItemProps {
formRef: Rhf.UseFormReturn<any>;
formRef: UseFormReturn<FieldValues>;
name: string;
disabled?: boolean;
itemname: string;
Expand Down
4 changes: 2 additions & 2 deletions lib/components/fields/Select.field.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react";
import * as Rhf from "react-hook-form";
import { FieldValues, UseFormReturn } from "react-hook-form";
export interface SelectFieldProps extends React.SelectHTMLAttributes<HTMLSelectElement> {
formRef: Rhf.UseFormReturn<Rhf.FieldValues>;
formRef: UseFormReturn<FieldValues>;
wrapperClasses?: string;
label: string;
name: string;
Expand Down
4 changes: 2 additions & 2 deletions lib/components/fields/Textarea.field.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react";
import * as Rhf from "react-hook-form";
import { FieldValues, UseFormReturn } from "react-hook-form";
export interface TextareaFieldProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
formRef: Rhf.UseFormReturn<Rhf.FieldValues>;
formRef: UseFormReturn<FieldValues>;
name: string;
label: string;
subLabel?: string;
Expand Down
4 changes: 2 additions & 2 deletions lib/components/fields/Toggle.field.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react";
import * as Rhf from "react-hook-form";
import { FieldValues, UseFormReturn } from "react-hook-form";
export interface ToggleFieldProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
formRef: Rhf.UseFormReturn<Rhf.FieldValues>;
formRef: UseFormReturn<FieldValues>;
name: string;
label: string;
subLabel: string;
Expand Down
12 changes: 12 additions & 0 deletions lib/components/overlays/Modal.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import * as React from "react";
export interface ModalProps {
children: React.ReactNode;
onClose: () => void;
width?: "max-w-sm" | "max-w-md" | "max-w-full";
}
export interface ModalHeaderProps {
}
export interface ModalFooterProps {
}
export declare const Modal: React.FC<ModalProps>;
export default Modal;
21 changes: 21 additions & 0 deletions lib/components/overlays/Modal.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/components/overlays/Modal.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import * as React from "react";
import { PositionType } from "../enums/positionType.enum";
import { PositionType } from "../../enums/positionType.enum";
export interface SlideOverProps {
onClose: () => void;
width?: "max-w-sm" | "max-w-md" | "max-w-full";
position?: PositionType.leftmid | PositionType.rightmid;
children: React.ReactNode;
}
Expand All @@ -16,5 +17,5 @@ export interface SlideOverHeaderProps {
}
export declare const SlideOverHeader: ({ title, description, children }: SlideOverHeaderProps) => JSX.Element;
export declare const SlideOverFooter: ({ children, className }: SlideOverFooterProps) => JSX.Element;
export declare const SlideOver: ({ children, onClose, position }: SlideOverProps) => JSX.Element;
export declare const SlideOver: ({ children, onClose, width, position }: SlideOverProps) => JSX.Element;
export default SlideOver;
Loading

0 comments on commit 768665c

Please sign in to comment.