Skip to content

Commit

Permalink
move ExtractNativePropsFromDefault to types folder
Browse files Browse the repository at this point in the history
- doesn't make much sense from folder structure perspective
  • Loading branch information
tvikito committed Sep 13, 2023
1 parent 5167695 commit a5c16e7
Show file tree
Hide file tree
Showing 19 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion storefront/components/Basic/Heading/Heading.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HTMLAttributes } from 'react';
import { twJoin } from 'tailwind-merge';
import { ExtractNativePropsFromDefault } from 'typeHelpers/ExtractNativePropsFromDefault';
import { ExtractNativePropsFromDefault } from 'types/ExtractNativePropsFromDefault';
import { twMergeCustom } from 'helpers/twMerge';

type NativeProps = ExtractNativePropsFromDefault<HTMLAttributes<HTMLHeadingElement>, never, 'style' | 'onClick'>;
Expand Down
2 changes: 1 addition & 1 deletion storefront/components/Basic/Icon/IconImage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HTMLAttributes } from 'react';
import { ExtractNativePropsFromDefault } from 'typeHelpers/ExtractNativePropsFromDefault';
import { ExtractNativePropsFromDefault } from 'types/ExtractNativePropsFromDefault';

type NativeProps = ExtractNativePropsFromDefault<HTMLAttributes<HTMLElement>, never, 'onClick' | 'title'>;

Expand Down
2 changes: 1 addition & 1 deletion storefront/components/Basic/Link/Link.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Button } from 'components/Forms/Button/Button';
import { AnchorHTMLAttributes } from 'react';
import { ExtractNativePropsFromDefault } from 'typeHelpers/ExtractNativePropsFromDefault';
import { ExtractNativePropsFromDefault } from 'types/ExtractNativePropsFromDefault';
import { ExtendedNextLink } from '../ExtendedNextLink/ExtendedNextLink';
import { twMergeCustom } from 'helpers/twMerge';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { HeartIcon } from 'components/Basic/Icon/IconsSvg';
import useTranslation from 'next-translate/useTranslation';
import { HTMLAttributes } from 'react';
import { ExtractNativePropsFromDefault } from 'typeHelpers/ExtractNativePropsFromDefault';
import { ExtractNativePropsFromDefault } from 'types/ExtractNativePropsFromDefault';
import { twMergeCustom } from 'helpers/twMerge';

type NativeProps = ExtractNativePropsFromDefault<HTMLAttributes<HTMLDivElement>, never, 'className'>;
Expand Down
2 changes: 1 addition & 1 deletion storefront/components/Forms/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { LabelWrapper } from 'components/Forms/Lib/LabelWrapper';
import { twMergeCustom } from 'helpers/twMerge';
import { forwardRef, InputHTMLAttributes, ReactNode } from 'react';
import { ExtractNativePropsFromDefault } from 'typeHelpers/ExtractNativePropsFromDefault';
import { ExtractNativePropsFromDefault } from 'types/ExtractNativePropsFromDefault';

type NativeProps = ExtractNativePropsFromDefault<
InputHTMLAttributes<HTMLInputElement>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ColorLabelWrapper } from 'components/Forms/Lib/ColorLabelWrapper';
import { InputHTMLAttributes } from 'react';
import tinycolor from 'tinycolor2';
import { ExtractNativePropsFromDefault } from 'typeHelpers/ExtractNativePropsFromDefault';
import { ExtractNativePropsFromDefault } from 'types/ExtractNativePropsFromDefault';

type NativeProps = ExtractNativePropsFromDefault<
InputHTMLAttributes<HTMLInputElement>,
Expand Down
2 changes: 1 addition & 1 deletion storefront/components/Forms/Form/Form.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FormEvent, FormHTMLAttributes } from 'react';
import { useFormContext } from 'react-hook-form';
import { ExtractNativePropsFromDefault } from 'typeHelpers/ExtractNativePropsFromDefault';
import { ExtractNativePropsFromDefault } from 'types/ExtractNativePropsFromDefault';

type NativeProps = ExtractNativePropsFromDefault<FormHTMLAttributes<HTMLFormElement>, never, 'onSubmit' | 'style'>;

Expand Down
2 changes: 1 addition & 1 deletion storefront/components/Forms/Lib/ChoiceFormLine.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { twMergeCustom } from 'helpers/twMerge';
import { HTMLAttributes } from 'react';
import { ExtractNativePropsFromDefault } from 'typeHelpers/ExtractNativePropsFromDefault';
import { ExtractNativePropsFromDefault } from 'types/ExtractNativePropsFromDefault';

type NativeProps = ExtractNativePropsFromDefault<HTMLAttributes<HTMLDivElement>, never, 'style'>;

Expand Down
2 changes: 1 addition & 1 deletion storefront/components/Forms/Lib/ColorLabelWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Tooltip } from 'components/Basic/Tooltip/Tooltip';
import { LabelHTMLAttributes } from 'react';
import { twJoin } from 'tailwind-merge';
import { ExtractNativePropsFromDefault } from 'typeHelpers/ExtractNativePropsFromDefault';
import { ExtractNativePropsFromDefault } from 'types/ExtractNativePropsFromDefault';

type NativeProps = ExtractNativePropsFromDefault<LabelHTMLAttributes<HTMLLabelElement>, never, 'htmlFor'>;

Expand Down
2 changes: 1 addition & 1 deletion storefront/components/Forms/Lib/FormLine.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HTMLAttributes } from 'react';
import { ExtractNativePropsFromDefault } from 'typeHelpers/ExtractNativePropsFromDefault';
import { ExtractNativePropsFromDefault } from 'types/ExtractNativePropsFromDefault';
import { twMergeCustom } from 'helpers/twMerge';

type NativeProps = ExtractNativePropsFromDefault<HTMLAttributes<HTMLDivElement>, never, 'style'>;
Expand Down
2 changes: 1 addition & 1 deletion storefront/components/Forms/Lib/LabelWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LabelHTMLAttributes, ReactNode } from 'react';
import { ExtractNativePropsFromDefault } from 'typeHelpers/ExtractNativePropsFromDefault';
import { ExtractNativePropsFromDefault } from 'types/ExtractNativePropsFromDefault';
import { twMergeCustom } from 'helpers/twMerge';
import { CheckmarkIcon } from 'components/Basic/Icon/IconsSvg';

Expand Down
2 changes: 1 addition & 1 deletion storefront/components/Forms/Radiobutton/Radiobutton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { LabelWrapper } from '../Lib/LabelWrapper';
import { Image } from 'components/Basic/Image/Image';
import { ImageSizesFragmentApi } from 'graphql/generated';
import { forwardRef, InputHTMLAttributes, MouseEventHandler, ReactNode, useCallback } from 'react';
import { ExtractNativePropsFromDefault } from 'typeHelpers/ExtractNativePropsFromDefault';
import { ExtractNativePropsFromDefault } from 'types/ExtractNativePropsFromDefault';

type NativeProps = ExtractNativePropsFromDefault<
InputHTMLAttributes<HTMLInputElement>,
Expand Down
2 changes: 1 addition & 1 deletion storefront/components/Forms/Select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { LabelWrapper } from 'components/Forms/Lib/LabelWrapper';
import { ReactNode } from 'react';
import SelectReact from 'react-select';
import { components, Props } from 'react-select';
import { ExtractNativePropsFromDefault } from 'typeHelpers/ExtractNativePropsFromDefault';
import { ExtractNativePropsFromDefault } from 'types/ExtractNativePropsFromDefault';

type NativeProps = ExtractNativePropsFromDefault<
Props,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { TextInput } from './TextInput';
import { InputHTMLAttributes, ReactElement, useCallback, useState } from 'react';
import { Control, useController } from 'react-hook-form';
import { twJoin } from 'tailwind-merge';
import { ExtractNativePropsFromDefault } from 'typeHelpers/ExtractNativePropsFromDefault';
import { ExtractNativePropsFromDefault } from 'types/ExtractNativePropsFromDefault';

type NativeProps = ExtractNativePropsFromDefault<InputHTMLAttributes<HTMLInputElement>, never, 'name'>;

Expand Down
2 changes: 1 addition & 1 deletion storefront/components/Forms/TextInput/SearchInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { CloseIcon, SearchIcon } from 'components/Basic/Icon/IconsSvg';
import { Loader } from 'components/Basic/Loader/Loader';
import useTranslation from 'next-translate/useTranslation';
import { InputHTMLAttributes, KeyboardEventHandler } from 'react';
import { ExtractNativePropsFromDefault } from 'typeHelpers/ExtractNativePropsFromDefault';
import { ExtractNativePropsFromDefault } from 'types/ExtractNativePropsFromDefault';
import { twMergeCustom } from 'helpers/twMerge';

type NativeProps = ExtractNativePropsFromDefault<InputHTMLAttributes<HTMLInputElement>, 'onChange', never>;
Expand Down
2 changes: 1 addition & 1 deletion storefront/components/Forms/TextInput/TextInput.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { LabelWrapper } from 'components/Forms/Lib/LabelWrapper';
import { forwardRef, InputHTMLAttributes, ReactNode } from 'react';
import { ExtractNativePropsFromDefault } from 'typeHelpers/ExtractNativePropsFromDefault';
import { ExtractNativePropsFromDefault } from 'types/ExtractNativePropsFromDefault';
import { twMergeCustom } from 'helpers/twMerge';

type NativeProps = ExtractNativePropsFromDefault<
Expand Down
2 changes: 1 addition & 1 deletion storefront/components/Forms/Textarea/Textarea.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { LabelWrapper } from 'components/Forms/Lib/LabelWrapper';
import { forwardRef, TextareaHTMLAttributes } from 'react';
import { twJoin } from 'tailwind-merge';
import { ExtractNativePropsFromDefault } from 'typeHelpers/ExtractNativePropsFromDefault';
import { ExtractNativePropsFromDefault } from 'types/ExtractNativePropsFromDefault';

type NativeProps = ExtractNativePropsFromDefault<
TextareaHTMLAttributes<HTMLTextAreaElement>,
Expand Down
2 changes: 1 addition & 1 deletion storefront/components/Forms/ToggleSwitch/ToggleSwitch.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { forwardRef, InputHTMLAttributes } from 'react';
import { ExtractNativePropsFromDefault } from 'typeHelpers/ExtractNativePropsFromDefault';
import { ExtractNativePropsFromDefault } from 'types/ExtractNativePropsFromDefault';

type NativeProps = ExtractNativePropsFromDefault<
InputHTMLAttributes<HTMLInputElement>,
Expand Down

0 comments on commit a5c16e7

Please sign in to comment.