Skip to content

Commit

Permalink
⭐️ Impl: Types - BlurViewConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed Aug 17, 2024
1 parent b4e59f8 commit c8eba85
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
20 changes: 20 additions & 0 deletions src/native_components/RNIBlurView/BlurViewConfig.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { UIBlurEffectStyle } from "react-native-ios-utilities";

export type BlurViewConfigBase = {
blurEffectStyle: UIBlurEffectStyle;
};

export type BlurViewConfig = BlurViewConfigBase & ({
mode: 'none';
}| {
mode: 'standard';
} | {
mode: 'customEffectIntensity';
/** Percent in decimal, i.e. 0...1 */
intensity: number;
} | {
mode: 'customBlurRadius';
radius: number;
});

export type BlurViewConfigMode = BlurViewConfig['mode'];
4 changes: 3 additions & 1 deletion src/native_components/RNIBlurView/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
export * from './RNIBlurView';
export * from './RNIBlurViewTypes';
export * from './RNIBlurViewTypes';

export * from './BlurViewConfig';

0 comments on commit c8eba85

Please sign in to comment.