Skip to content

Commit

Permalink
🛠 Refactor: Types - Rename Types
Browse files Browse the repository at this point in the history
TODO:2023-03-04-04-20-46 - Library Typescript Re-Write

Summary:
* Fix symbol clash between `src/constants/Enums`, and types via prefixing type names w/ 'T'./
* Add 'T' prefix to `UIModalTransitionStyle`.
* Add 'T' prefix to `UIBlurEffectStyles`.
* Add `T` prefix to `TUIBlurEffectStyles`.

empty
  • Loading branch information
dominicstop committed Mar 3, 2023
1 parent fa85809 commit d4545eb
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions src/constants/Enums.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { UIBlurEffectStyles as TUIBlurEffectStyles } from 'src/types/UIBlurEffectStyles';
import type { TUIBlurEffectStyles } from 'src/types/UIBlurEffectStyles';

import type {
UIModalPresentationStyle as TUIModalPresentationStyle,
UIModalTransitionStyle as TUIModalTransitionStyle,
TUIModalPresentationStyle,
TUIModalTransitionStyle,
} from 'src/types/UIModalTypes';

export const UIBlurEffectStyles: {
Expand Down
16 changes: 8 additions & 8 deletions src/native_components/RNIModalView/RNIModalViewTypes.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { ViewProps } from 'react-native';

import type { UIBlurEffectStyles } from 'src/types/UIBlurEffectStyles';
import type { TUIBlurEffectStyles } from 'src/types/UIBlurEffectStyles';

import type {
UIModalPresentationStyle,
UIModalTransitionStyle,
TUIModalPresentationStyle,
TUIModalTransitionStyle,
} from 'src/types/UIModalTypes';

import type { ViewManagerConstantMap } from 'src/types/ViewModuleRelatedTypes';
Expand Down Expand Up @@ -35,9 +35,9 @@ export type RNIModalViewBaseProps = {
// --------------

modalID?: string;
modalTransitionStyle?: UIModalTransitionStyle;
modalBGBlurEffectStyle?: UIBlurEffectStyles;
modalPresentationStyle?: UIModalPresentationStyle;
modalTransitionStyle?: TUIModalTransitionStyle;
modalBGBlurEffectStyle?: TUIBlurEffectStyles;
modalPresentationStyle?: TUIModalPresentationStyle;

// Props - Events
// --------------
Expand All @@ -57,6 +57,6 @@ export type RNIModalViewBaseProps = {
export type RNIModalViewProps = Partial<ViewProps> & RNIModalViewBaseProps;

export type RNIModalViewConstantMap = ViewManagerConstantMap<{
availableBlurEffectStyles: UIBlurEffectStyles[];
availablePresentationStyles: UIModalPresentationStyle[];
availableBlurEffectStyles: TUIBlurEffectStyles[];
availablePresentationStyles: TUIModalPresentationStyle[];
}>;
2 changes: 1 addition & 1 deletion src/types/UIBlurEffectStyles.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** Maps to `UIBlurEffect.Style` */
export type UIBlurEffectStyles =
export type TUIBlurEffectStyles =
| 'systemUltraThinMaterial'
| 'systemThinMaterial'
| 'systemMaterial'
Expand Down
4 changes: 2 additions & 2 deletions src/types/UIModalTypes.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export type UIModalTransitionStyle =
export type TUIModalTransitionStyle =
| 'coverVertical'
| 'flipHorizontal'
| 'crossDissolve'
| 'partialCurl';

export type UIModalPresentationStyle =
export type TUIModalPresentationStyle =
| 'automatic'
| 'none'
| 'fullScreen'
Expand Down

0 comments on commit d4545eb

Please sign in to comment.