import React, {Component} from 'react';
import {ScrollView, StyleSheet} from 'react-native';
import {Colors, View, Badge, Text, Image, Stepper} from 'react-native-ui-lib'; //eslint-disable-line
const BadgesSpace = 30;
const star = require('../../assets/icons/star.png');
const bell = require('../../assets/icons/bell.png');
export default class BadgesScreen extends Component {
state = {
value: 42
};
changeLabelValue(value: number) {
const currValue = this.state.value;
const newValue = currValue + value;
if (newValue >= 1) {
this.setState({value: newValue});
}
}
customElement1 = (
);
customElement2 = (
37
);
onValueChange = (value: number, _?: string) => {
this.setState({value});
};
render() {
const {value} = this.state;
return (
Badges
Press buttons to change red badge value by 1.{'\n'}Long press to change it by 10.
Pimple Badges
size={'{6}'}
size={'{10}'}
size={'{14}'}
Icon Badges
small(16)
default(20)
large(24)
border radius
Counter Icon Badges
Custom Element Badges
);
}
}
const styles = StyleSheet.create({
container: {
padding: 20
}
});