@sbaiahmed1/react-native-blur
Version:
React native modern blur view
69 lines • 1.83 kB
TypeScript
import React from 'react';
import type { ViewStyle, StyleProp, ColorValue } from 'react-native';
export declare const toColorString: (color: ColorValue | undefined, fallback: string) => string;
export interface BlurSwitchProps {
/**
* @description The current value of the switch
*
* @default false
*/
value?: boolean;
/**
* @description Callback invoked when the switch value changes
*
* @default undefined
*/
onValueChange?: (value: boolean) => void;
/**
* @description The intensity of the blur effect (0-100)
*
* @platform android
*
* @default 10
*/
blurAmount?: number;
/**
* @description The number of blur interactions to perform for a smoother
* effect (1-15)
*
* @default 5
*
* @platform Android
*/
blurRounds?: number;
/**
* @description The color of the switch thumb
*
* @platform ios
* @default '#FFFFFF'
*/
thumbColor?: ColorValue;
/**
* @description The track colors for off and on states
*
* Note: On Android, you only need to set the `true` (base) color.
* QmBlurView will automatically calculate the on/off state colors.
* The `false` color is only used on iOS.
*
* @default { false: '#E5E5EA', true: '#34C759' }
*/
trackColor?: {
false?: ColorValue;
true?: ColorValue;
};
/**
* @description Whether the switch is disabled
*
* @default false
*/
disabled?: boolean;
/**
* @description Style object for the switch view
*
* @default undefined
*/
style?: StyleProp<ViewStyle>;
}
export declare const BlurSwitch: React.NamedExoticComponent<BlurSwitchProps>;
export default BlurSwitch;
//# sourceMappingURL=BlurSwitch.d.ts.map