
Security News
Feross on Risky Business Weekly Podcast: npm’s Ongoing Supply Chain Attacks
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
axelra-react-utilities
Advanced tools
This package provides utility components when building React projects with styled-components.
Use the default ThemeProvider
of styled-components
to wrap your application (e.g. in _app.js
when using Next.js).
Create and customize a theme using makeTheme
.
import {makeTheme} from 'axelra-react-utilities';
// Check reference config object for all available confiugrattion possibilities.
const theme = makeTheme({spacing: 10});
<ThemeProvider theme={theme}>
// ...
</ThemeProvider>
The following object represents a complete list of all possible customizations. All values can be adapted, but it is not possible to add additional keys (e.g. fontSize xxl)
const config = {
spacing: 8,
breakPoints: {
sm: 640,
md: 768,
lg: 1024,
xl: 1280,
xxl: 1536,
},
fontSizes: {
xs: {
size: "0.75rem",
lineHeight: "1rem",
},
sm: {
size: "0.875rem",
lineHeight: "1.25rem",
},
base: {
size: "1rem",
lineHeight: "1.5rem",
},
lg: {
size: "1.125rem",
lineHeight: "1.75rem",
},
xl: {
size: "1.25rem",
lineHeight: "1.75rem",
},
"2xl": {
size: "1.5rem",
lineHeight: "2rem",
},
"3xl": {
size: "1.875rem",
lineHeight: "2.25rem",
},
"4xl": {
size: "2.25rem",
lineHeight: "2.5rem",
},
"5xl": {
size: "3rem",
lineHeight: "normal",
},
"6xl": {
size: "3.75rem",
lineHeight: "normal",
},
"7xl": {
size: "4.5rem",
lineHeight: "normal",
},
"8xl": {
size: "6rem",
lineHeight: "normal",
},
"9xl": {
size: "8rem",
lineHeight: "normal",
},
},
}
Use this component to add space. It uses multiplieres of the spacing
variable in combination with the defined breakPoints
.
<ResponsiveSpacer x={4} sm={6} lg={8}/>
The Text component is a generic component which provides different typography combinations.
<Text center block size={"7xl"} weight={"Bold"} color={"#ff0000"}>Your Text here</Text>
It is also possible to further adapt the Text component using styled-components
const MyText = styled(Text).attrs({center: true, size: "2xl"})`
padding-bottom: 8px
`;
The <MaxWidthContainer/>
boxes the layout based on the configured breakpoints.
It sets the max-width
of an element to match the min-width
of the current breakpoint
FAQs
Axelra React (Web) utilities
We found that axelra-react-utilities demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.