Giter VIP home page Giter VIP logo

react-native-btr's Introduction

react-native-btr's People

Contributors

cobarx avatar julio-nt avatar mihaicc30 avatar ravikanthob avatar thakurballary avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

react-native-btr's Issues

problem importing some components

It seems that all the components that are implemented as function components can be imported like this:

import {CheckBox, ColorPicker} from 'react-native-btr';

But all the components that are implemented with classes cannot be imported like this:

import {CollapsibleCard, RadioGroup, SnackBar} from 'react-native-btr';

It says these imports are not found.
Is there another way I can use them?

EventEmitter.removeListener('didUpdateDimensions', ...): Method has been deprecated

Hello

I am getting the following warning :

EventEmitter.removeListener('didUpdateDimensions', ...): Method has been deprecated. Please instead use remove() on the subscription returned by EventEmitter.addListener.

when I used the bottom sheet component

any idea or help how to avoid it ? I think it's related to the component it self and how it's built

Unrecognized font family 'Material Icons'

Hi,

I am currently trying to use the CheckBox component. However when I import it into the project, I get this error:
Unrecognized font family 'Material Icons'

Here is our package.json:

"react": "16.10.2",
"react-native": "0.61.2",
"react-native-btr": "^1.1.4",

We do not have the vector-icon library installed directly in our package.json but I understand it's not needed right ?

This happens on the iOS Simulator, I have not tried Android yet.

Does the react-native-vector-icons library need to be installed manually in the project ?

Thanks
Greg

only works with Expo

Hello ThakurBallary,

What a great library!

I am looking for radio group for my react native project, and I found out this library, but when I run my project after adding this library an error occurred.

The error says

... Module @expo/vector-icons does not exist in the Haste module map ...

and finally i found out that your library only works with expo.

I think it is a better idea if you add note on your readme, that this library only works with expo.

Thanks you

Screen is flashing when user close the bottomsheet

When closing the BottomSheet component, the screen exhibits an unexpected flashing behavior. Specifically, the issue manifests as a sequence of color changes on the screen when the BottomSheet is toggled. The sequence is as follows:

  1. Upon initiation of the BottomSheet's closing action, the screen momentarily darkens.
  2. Subsequently, as the BottomSheet continues its closing animation, the screen briefly brightens.
  3. Following this, there is an additional, unexpected darkening of the screen.
  4. Finally, the screen brightens once again, returning to its original state.
const FilterButtomSheet = ({ isVisible, onClose }) => {
  const [isFilterVisible, setIsFilterVisible] = useState(false);
  const [selectedFilter, setSelectedFilter] = useState(filterOptions[0]);


  return (
    <BottomSheet
      visible={isVisible}
      onBackButtonPress={onClose}
      onBackdropPress={onClose}
    >
      <View style={styles.bottomNavigationView}>
        {filterOptions.map((option, index) => (
          <TouchableOpacity
            key={index}
            onPress={() => {
              setIsFilterVisible(true);
              onClose();
            }}
            style={styles.item}
          >
            <Text style={textStyles.LabelSemiboldMedium}>{option}</Text>
            <RadioButton
              isSelected={selectedFilter === option}
              onPress={() => {
                setSelectedFilter(option);
              }}
            />
          </TouchableOpacity>
        ))}
      </View>
    </BottomSheet>
  );
};
export default FilterButtomSheet;

const styles = StyleSheet.create({
  bottomNavigationView: {
    backgroundColor: 'white',
    width: '100%',
    borderRadius: 24,
    padding: 12,
    paddingBottom: 20,
    justifyContent: 'center',
    alignItems: 'center',
  },
  item: {
    flexDirection: 'row',
    justifyContent: 'space-between',
    padding: 12,
    width: '100%',
  },
});

RadioButtons

Having trouble with find method with implementing radio buttons with dynamic data. Should I import it from any other npm module, any help is much appreciated. Thankyou

RadioButton center circle is not centered

When running on a samsung 8" tablet the radio buttons appear slightly mis-shapen with the center selected circle obviously off center. This could possibly be related to issue #2 but in my case presents with a very obviously offset graphic. The root cause of this is the size of the element does not take into account pixel density. Specifying a size of 8 may result in unexpected aliasing and positioning on a device with a pixel density of 3. The fix is to use PixelRatio.roundToNearestPixel() to set the sizes.

The patch below fixes the problem for me:

patch-package
--- a/node_modules/react-native-btr/src/Components/RadioButton.js
+++ b/node_modules/react-native-btr/src/Components/RadioButton.js
@@ -1,5 +1,5 @@
 import React from 'react';
-import { TouchableOpacity, View } from 'react-native';
+import { TouchableOpacity, View, PixelRatio } from 'react-native';
 import PropTypes from 'prop-types';
 
 const RadioButton = props => {
@@ -16,16 +16,16 @@ const RadioButton = props => {
     <View
     style={{
       borderColor: props.color,
-      borderRadius: props.size * 2,
-      borderWidth: 2,
+          borderRadius: PixelRatio.roundToNearestPixel(props.size * 2),
+          borderWidth: PixelRatio.roundToNearestPixel(2),
       opacity
     }}>
     <View
       style={{
         backgroundColor: props.checked ? props.color : '#0000',
-        borderRadius: props.size,
-        padding: props.size,
-        margin: props.size * .2,
+            borderRadius: PixelRatio.roundToNearestPixel(props.size),
+            padding: PixelRatio.roundToNearestPixel(props.size),
+              margin: PixelRatio.roundToNearestPixel(props.size * .2),
       }}
     />
     </View>

unable to use in ejected react-native app

bundling failed: Error: Unable to resolve module @expo/vector-icons from /home/imsov/git/d4d/no de_modules/react-native-btr/src/Components/CheckBox.js: Module @expo/vector-icons does not exist in th
e Haste module map

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.