Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const styles = StyleSheet.create({
animatedContainer: {
position: 'absolute',
left: 0,
right: 0,
alignItems: 'center',
bottom: 0
},
image: {
...StyleSheet.absoluteFillObject,
width: '100%',
height: '100%'
},
shadow: {
shadowColor: Colors.dark40,
shadowOffset: {height: 5, width: 0},
shadowOpacity: 0.35,
shadowRadius: 12,
elevation: 2
}
});
export default FloatingButton;
render() {
return (
);
}
}
onPress={() => this.showSnippet(this.button_16a)}
/>
<button style="{{marginBottom:" label="Red Outline"> (this.button_16 = element)}
onPress={() => this.showSnippet(this.button_16)}
/>
</button><button style="{{marginBottom:" label="Outline with background"> (this.button_24 = element)}
onPress={() => this.showSnippet(this.button_24)}
/>
</button><button style="{{marginBottom:" disabled="" label="Disabled Outline"> (this.button_16 = element)}
onPress={() => this.showSnippet(this.button_16)}
/>
</button>
} from 'react-native';
import _ from 'lodash';
import {
Colors,
Constants,
Modal,
Image,
Text,
Typography,
View,
} from 'react-native-ui-lib';
import BaseInput from './BaseInput';
import TextArea from './TextArea';
const DEFAULT_COLOR_BY_STATE = {
default: Colors.dark40,
focus: Colors.blue30,
error: Colors.red30,
};
const DEFAULT_UNDERLINE_COLOR_BY_STATE = {
default: Colors.dark70,
focus: Colors.blue30,
error: Colors.red30,
};
const LABEL_TYPOGRAPHY = Typography.text80;
export default class TextInput extends BaseInput {
static displayName = 'TextInput';
static propTypes = {
...RNTextInput.propTypes,
...BaseInput.propTypes,
/**
import PropTypes from 'prop-types';
import { TextInput as RNTextInput, StyleSheet, Animated } from 'react-native';
import _ from 'lodash';
import {
Colors,
Constants,
Modal,
Text,
Typography,
View,
} from 'react-native-ui-lib';
import BaseInput from './BaseInput';
import TextArea from './TextArea';
const DEFAULT_COLOR_BY_STATE = {
default: Colors.dark40,
focus: Colors.blue30,
error: Colors.red30,
};
const DEFAULT_UNDERLINE_COLOR_BY_STATE = {
default: Colors.dark70,
focus: Colors.blue30,
error: Colors.red30,
};
/**
* @description: A wrapper for Text Input component with extra functionality like floating placeholder
* @extends: TextInput
* @extendslink: https://facebook.github.io/react-native/docs/textinput.html
* @modifiers: Typography
* @gif: https://media.giphy.com/media/xULW8su8Cs5Z9Fq4PS/giphy.gif, https://media.giphy.com/media/3ohc1dhDcLS9FvWLJu/giphy.gif, https://media.giphy.com/media/oNUSOxnHdMP5ZnKYsh/giphy.gif
* @example: https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/InputsScreen.js
{item.count > 0 && <button label="{item.count}" size="{'small'}">}
);
}
}</button>