Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@purpurds/grid
Advanced tools
import { Meta, Stories, ArgTypes, Primary, Subtitle } from "@storybook/blocks";
import { Meta, Stories, ArgTypes, Primary, Subtitle } from "@storybook/blocks";
import * as GridStories from "./src/grid.stories"; import * as GridItemStories from "./src/grid.item.stories"; import packageInfo from "./package.json";
Version {packageInfo.version}
Add the dependency to your consumer app like "@purpurds/purpur": "^x.y.z"
The standard usage is to have multiple elements directly as children of the Grid
component. It's also possible to only have one, to get the standard page padding, max width and prevent getting gaps between elements.
In MyApp.tsx
import "@purpurds/purpur/styles";
In MyComponent.tsx
import { Grid } from "@purpurds/purpur";
export const MyComponent = () => {
return (
<Grid colsSm={2} colsMd={4} colsLg={6}>
<div>Grid item 1</div>
<div>Grid item 2</div>
<div>Grid item 3</div>
<div>Grid item 4</div>
<div>Grid item 5</div>
<div>Grid item 6</div>
</Grid>
);
};
noGap
import { Grid } from "@purpurds/purpur";
export const MyComponent = () => {
return (
<Grid noGap colsMd={3}>
<div>Grid item 1</div>
<div>Grid item 2</div>
<div>Grid item 3</div>
</Grid>
);
};
Besides noGap
, noColGap
and noRowGap
are also available
import { Grid } from "@purpurds/purpur";
export const MyComponent = () => {
return (
<Grid>
<Grid colsSm={1} colsMd={3} colsLg={3}>
<div>Grid item 1</div>
<div>Grid item 2</div>
<div>Grid item 3</div>
</Grid>
<Grid colsSm={1} colsMd={2} colsLg={2}>
<div>Grid item 4</div>
<div>Grid item 5</div>
</Grid>
<Grid colsSm={1} colsMd={2} colsLg={2}>
<div>Grid item 6</div>
<div>Grid item 7</div>
</Grid>
</Grid>
);
};
import { Grid } from "@purpurds/purpur";
export const MyComponent = () => {
return (
<Grid>
<Grid.Item colSpanSm={2} colSpanMd={5} colSpanLg={3}>
Grid item 1
</Grid.Item>
<Grid.Item colSpanSm={2} colSpanMd={3} colSpanLg={9}>
Grid item 2
</Grid.Item>
<Grid.Item colSpanSm={4} colSpanMd={2} colSpanLg={6}>
Grid item 3
</Grid.Item>
<Grid.Item colSpanSm={4} colSpanMd={6} colSpanLg={6}>
Grid item 4
</Grid.Item>
</Grid>
);
};
FAQs
import { Meta, Stories, ArgTypes, Primary, Subtitle } from "@storybook/blocks";
The npm package @purpurds/grid receives a total of 1,855 weekly downloads. As such, @purpurds/grid popularity was classified as popular.
We found that @purpurds/grid demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.