Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@crave/farmblocks-image
Advanced tools
A React component for thumbnail images. See Storybook
npm install @crave/farmblocks-image
See it on zeplin: Thumbnails: https://scene.zeplin.io/project/595a9cd3b401bf1876faab27/screen/59f0df2fee4fbc85eccb17b1 Badges: https://scene.zeplin.io/project/595a9cd3b401bf1876faab27/screen/59f0df31bbc93198a853bbe2
import React from "react";
import ReactDOM from "react-dom";
import Image, { thumbnailSizes, badgeSizes } from "@crave/farmblocks-image";
const root = document.createElement("div");
const imageUrl =
"https://openclipart.org/image/300px/svg_to_png/290343/1510649016.png&disposition=attachment";
ReactDOM.render(<Image src={imageUrl} size={badgeSizes.LARGE} badge />, root);
document.body.appendChild(root);
Property | Description | Type |
---|---|---|
src | required, the URL of the image | string |
badge | make the image a circle | boolean |
borderRadius | the border radius of the image (it will be ignored if the badge prop is true) | string or number |
fit | how should the image fit the size (same options that the object-fit css attribute) | string |
height | the height of the image | string or number |
size | if your image uses the same size in pixels for width and height, you can use this shorthand | number |
width | the width of the image | string |
Type | Value | Size result |
---|---|---|
badge - extra small | badgeSizes.X_SMALL | 16 px |
badge - small | badgeSizes.SMALL | 24 px |
badge - medium | badgeSizes.MEDIUM | 40 px |
badge - large | badgeSizes.LARGE | 56 px |
thumbnail - small | thumbnailSizes.SMALL | 40 px |
thumbnail - medium | thumbnailSizes.MEDIUM | 48 px |
thumbnail - large | thumbnailSizes.LARGE | 72 px |
thumbnail - extra large | thumbnailSizes.X_LARGE | 120 px |
thumbnail - huge | thumbnailSizes.HUGE | 240 px |
MIT
FAQs
A react component for thumbnail images
The npm package @crave/farmblocks-image receives a total of 154 weekly downloads. As such, @crave/farmblocks-image popularity was classified as not popular.
We found that @crave/farmblocks-image demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.