Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@shipt/react-native-tachyons
Advanced tools
# with npm
npm i --save @shipt/react-native-tachyons
# with yarn
yarn add @shipt/react-native-tachyons
You can compose your own styles and pass them into the build process as desired.
// styleConfig.js
import { build } from '@shipt/react-native-tachyons';
import { StyleSheet } from 'react-native';
// define your rem
const rem = 16;
// define your color palette
const colors = {
white: '#ffffff',
black: '#000000'
};
// define your style shorthands
const styles = {
'gutter-h': { paddingLeft: '1rem', paddingRight: '1rem' },
'gutter-v': { paddingTop: '1rem', paddingBottom: '1rem' },
'some-style': { height: 100, width: '100%' }
};
// Run build
build({
rem,
colors,
styles,
StyleSheet // React Native's StyleSheet is required
});
And then...
// another file
import T from '@shipt/react-native-tachyons';
// ... other imports
function MyComponent() {
return <View style={T('flx-i gutter-h bg-white')} />;
}
export default MyComponent;
If you find yourself wanting to override some styles with something custom in some places in your app. Just throw them in the function call with your string of shorthands.
import T from '@shipt/react-native-tachyons'
// ... other imports
const customStyle = StyleSheet.create({
MyComponent: {
width: 234
}
})
function MyComponent() {
return <View style={T('flx-i gutter-h bg-white', customStyle.MyComponent)} />
}
// Also, it's just a function, so it can be abstracted in any way you see fit
function MyCleanerComponent(props) {
const style = props.active
? T('flx-i gutter-h bg-white', customStyle.MyComponent)
: T('flx-i gutter-h bg-black', customStyle.MyComponent)
return <View style={style} />
}
export default MyComponent
export default MyCleanerComponent
import { View, Text } from 'react-native';
import { styled } from '@shipt/react-native-tachyons';
// ... other imports
const ButtonContainer = styled(View)`flx-i gutter ${props => (props.primary ? 'green' : 'white')}`;
const ButtonContent = styled(Text)`white`;
export function Button(props) {
return (
<ButtonContainer primary={props.primary} style={props.style}>
<ButtonContext>{props.text}</ButtonContext>
</ButtonContainer>
);
}
FAQs
Tachyons for RN
The npm package @shipt/react-native-tachyons receives a total of 0 weekly downloads. As such, @shipt/react-native-tachyons popularity was classified as not popular.
We found that @shipt/react-native-tachyons demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 101 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.