react-native-lamantin
Version:
Set of components for https://lamantin.group development
35 lines (34 loc) • 974 B
TypeScript
import { Component } from 'react';
import { Animated, ViewStyle } from 'react-native';
interface StateViewProps {
/**
* Use for indicate state of view: enabled or disabled
*/
enabled?: boolean;
/**
* Use for change opacity of disabled state;
* 0 - transparent
* 1 - visible
*/
disabledOpacity?: number;
style?: ViewStyle;
}
/**
* Wrapper for create disabled state for each view.
*
* This is achieved by applying an opacity mask on childs inside StateView.
* Use *disabledOpacity* option for change opacity level, where 0 - transparent and 1 - visible.
*/
export declare class StateView extends Component<StateViewProps> {
static defaultProps: {
enabled: boolean;
disabledOpacity: number;
style: {};
};
state: {
animatedOpacity: Animated.Value;
};
componentDidUpdate(prevProps: StateViewProps, prevState: StateViewProps): void;
render(): JSX.Element;
}
export {};