Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@thoughtbot/react-native-typescript-styles
Advanced tools
CLI utility for downloading the react-native-typescript-styles starter.
Kick-start your new React Native TypeScript project with simple, organized styles.
React Native has no standard framework for structuring styles. This results in each project using a unique structure, which makes it harder to switch between projects and work efficiently.
This project is a starter framework for organizing styles in new React Native projects.
color: Colors.primary.blue,
height: Sizing.layout.x20,
borderWidth: Outlines.borderWidth.thin
Place the styles
directory in your project.
Install react-native-typography.
yarn add react-native-typography
The Typography module uses this library as it makes it easy to use the default system font families and weights on both iOS and Android.
import { Buttons, Colors, Outlines, Sizing, Typography } from "../styles";
const style = StyleSheet.create({
header: {
paddingBottom: Sizing.layout.x20,
borderBottomWidth: Outlines.borderWidth.thin,
borderColor: Colors.neutral.gray6,
},
headerText: {
...Typography.fontSize.x50,
...Typography.fontWeight.semibold,
},
button: {
...Buttons.bar.primary,
},
buttonText: {
...Buttons.barText.primary,
},
});
// colors.ts
type Brand = "primary" | "secondary";
export const brand: Record<Brand, string> = {
primary: "#0c00a6",
secondary: "#f03f0a",
};
An example app is located in a separate repository: RNStylingTemplate.
All style modules should follow the Style Guide
This project is intended to establish a structure for organizing a design system. Therefore, the styles themselves are not opinionated in terms of visual design. Users are expected to adapt the styles to the needs of their project. This may include changing or adding colors, typography, buttons, etc.
The styles within this project are separated by category into modules, including
Colors
, Sizing
, and Buttons
. Each module contains a set of objects which
provide styles for a specific kind of thing within the module category. For
example, the Colors
module provides objects for primary
and neutral
colors. Finally, each of these objects itself provides key/value pairs for
specific styles: in this case, particular primary and neutral colors.
Styles are then used as such:
color: Colors.primary.blue
Read the blog post, "React Native Styling: Structure for Style Organization"
react-native-typescript-styles is maintained and funded by thoughtbot, inc. The names and logos for thoughtbot are trademarks of thoughtbot, inc.
We love open source software! See our other projects or hire us to design, develop, and grow your product.
FAQs
CLI utility for adding the styles from react-native-typescript-styles to your project.
The npm package @thoughtbot/react-native-typescript-styles receives a total of 1 weekly downloads. As such, @thoughtbot/react-native-typescript-styles popularity was classified as not popular.
We found that @thoughtbot/react-native-typescript-styles demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.