
Product
Socket Now Protects the Chrome Extension Ecosystem
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
@emotion/primitives-core
Advanced tools
Shared utilities for emotion primitives and native
Note: In most of the cases, you won't need this package and should use
@emotion/native
or@emotion/primitives
.
This package contains some shared utilities which are consumed by @emotion/primitives
and @emotion/native
for styling and rendering components.
This package provides two functions, createCss
and createStyled
.
createCss(StyleSheet)
createCss
accepts a platform specific StyleSheet
method for creating styles, and returns a function which accepts styles via string template literal and object literal notation.
import { StyleSheet, View, Text } from 'react-native'
import { createCss } from '@emotion/primitives-core'
const css = createCss(StyleSheet)
<View style={css`background-color: red;`}><Text style={css`font-size: 40px;`}>Hello World</Text></View>
createStyled(StyleSheet)
createStyled
also accepts a platform specific StyleSheet
method for creating styles. It returns a function to which primitives can be assigned for example - View
, Text
, and it returns a styled component.
import { StyleSheet, View, Text } from 'react-native'
import { createStyled } from '@emotion/primitives-core'
const styled = createStyled(StyleSheet)
styled.Text = styled(Text)
const StyledText = styled.Text`font-size: 40px;`
<View><StyledText>Hello World</StyledText></View>
FAQs
Shared utilities for emotion primitives and native
The npm package @emotion/primitives-core receives a total of 70,868 weekly downloads. As such, @emotion/primitives-core popularity was classified as popular.
We found that @emotion/primitives-core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 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.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.