Gathering detailed insights and metrics for @truefit/bach-rn-elements
Gathering detailed insights and metrics for @truefit/bach-rn-elements
Gathering detailed insights and metrics for @truefit/bach-rn-elements
Gathering detailed insights and metrics for @truefit/bach-rn-elements
npm install @truefit/bach-rn-elements
Typescript
Module System
Node Version
NPM Version
TypeScript (81.59%)
JavaScript (18.41%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
31 Commits
1 Forks
1 Watchers
3 Branches
8 Contributors
Updated on Jun 15, 2021
Latest Version
2.1.0
Package Id
@truefit/bach-rn-elements@2.1.0
Unpacked Size
24.96 kB
Size
9.00 kB
File Count
29
NPM Version
7.6.3
Node Version
15.11.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
21
This library allows components composed with @truefit/bach to build their react native apps using react-native-elements.
npm install @truefit/bach-rn-elements react-native-elements react-native-vector-icons
or
yarn add @truefit/bach-rn-elements react-native-elements react-native-vector-icons
This function allows you to provide your configuration shared styles. It is not required, but can prove helpful when using a design system.
Parameter | Type | Description |
---|---|---|
sharedStyle | js object | the styles that should be available to every component |
Example
1import {configureStyle, NamedStyles} from '@truefit/bach-rn-elements'; 2 3// styles 4const sharedStyle: NamedStyles = { 5 container: { 6 flex: 1, 7 justifyContent: 'flex-start', 8 alignItems: 'flex-start', 9 }, 10 11 centerContent: { 12 justifyContent: 'center', 13 alignItems: 'center', 14 }, 15}; 16 17#### Javascript 18 19// configure 20configureStyle({sharedStyle});
1import {configureStyle} from '@truefit/bach-rn-elements'; 2 3// styles 4const sharedStyle = { 5 container: { 6 flex: 1, 7 justifyContent: 'flex-start', 8 alignItems: 'flex-start', 9 }, 10 11 centerContent: { 12 justifyContent: 'center', 13 alignItems: 'center', 14 }, 15}; 16 17// configure 18configureStyle({sharedStyle});
Allows you to specify component specific styles as well as access the shared style defined in configureStyle.
Helper Signature
Parameter | Type | Description |
---|---|---|
componentStyles | js object or js func | component specific styles or a function that returns the component specific styles. if a function is specified, it is provided with the current props. |
conditions | array (optional) | like other enhances such as withState, this controls how often the componentStyles value is re-evaluted |
Example
1import React from 'react'; 2import {compose} from '@truefit/bach'; 3import {compose, withState, withCallback, StringKeyMap} from '@truefit/bach'; 4import {withStyles, WithTheme} from '@truefit/bach-rn-elements'; 5 6import {View, StyleProp, ViewStyle, TextStyle} from 'react-native'; 7import {Text} from 'react-native-elements'; 8 9type Props = { 10 styles: { 11 container: StyleProp<ViewStyle>; 12 title: StyleProp<TextStyle>; 13 }; 14} & WithTheme; 15 16const Landing = ({styles}: Props) => { 17 return ( 18 <View style={styles.centerContent}> 19 <Text h1 style={styles.title}> 20 Welcome to the React Native Playground 21 </Text> 22 </View> 23 ); 24}; 25 26const styles = ({theme}: Props): NamedStyles => ({ 27 title: { 28 textAlign: 'center', 29 color: theme.colors.primary, 30 }, 31}); 32 33export default compose( 34 withStyles(styles), 35)(Landing);
1import React from 'react'; 2import {compose} from '@truefit/bach'; 3import {withStyles} from '@truefit/bach-rn-elements'; 4import {Text} from 'react-native-elements'; 5 6import Layout from './layout'; 7 8const Landing = ({styles}) => { 9 return ( 10 <Layout style={styles.centerContent} full> 11 <Text h1 style={styles.title}> 12 Welcome to the React Native Playground 13 </Text> 14 </Layout> 15 ); 16}; 17 18export default compose( 19 withStyles(({theme}) => { 20 return { 21 title: { 22 textAlign: 'center', 23 color: theme.colors.primary, 24 }, 25 }; 26 }), 27)(Landing);
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/29 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
34 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More