Skip to content

Commit

Permalink
fix: typing
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Jul 19, 2023
1 parent bee7818 commit ff99d3c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 6 deletions.
27 changes: 27 additions & 0 deletions src/components/form/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { FormikErrors } from 'formik';

import AutocompleteField, { AutocompleteFieldProps } from './AutocompleteField';
import CheckboxField, { CheckboxFieldProps } from './CheckboxField';
import EmailField, { EmailFieldProps } from './EmailField';
Expand All @@ -7,6 +9,7 @@ import SubmitButton, { SubmitButtonProps } from './SubmitButton';
import TextField, { TextFieldProps } from './TextField';

export {
type FormikErrors as FormErrors,
AutocompleteField, type AutocompleteFieldProps,
CheckboxField, type CheckboxFieldProps,
EmailField, type EmailFieldProps,
Expand All @@ -15,3 +18,27 @@ export {
SubmitButton, type SubmitButtonProps,
TextField, type TextFieldProps
};

// TODO: Replace the above with the below.
// export type {
// FormikErrors as FormErrors,
// AutocompleteFieldProps,
// CheckboxFieldProps,
// EmailFieldProps,
// ContainerProps,
// PasswordFieldProps,
// SubmitButtonProps,
// TextFieldProps
// };

// const Form = {
// AutocompleteField,
// CheckboxField,
// EmailField,
// Container,
// PasswordField,
// SubmitButton,
// TextField
// };

// export default Form;
12 changes: 6 additions & 6 deletions src/components/page/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import Notification, { NotificationProps } from './Notification';
import Section, { SectionProps } from './Section';
import TabBar, { TabBarProps } from './TabBar';

export {
type BannerProps,
type ContainerProps,
type NotificationProps,
type SectionProps,
type TabBarProps
export type {
BannerProps,
ContainerProps,
NotificationProps,
SectionProps,
TabBarProps
};

const Page = {
Expand Down

0 comments on commit ff99d3c

Please sign in to comment.