
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
solid-resizable
Advanced tools
A `Resizable` component to resize its content by dragging handles on its edges.
A Resizable
component to resize its content by dragging handles on its edges.
To install the solid-resizable
package, simply use your preferred package manager:
yarn add solid-resizable
or
pnpm add solid-resizable
You can import the Resizable
component into your project like this:
import Resizable from 'solid-resizable';
Here is an example of how to use the Resizable
component:
<Resizable
leftHandle={true}
rightHandle={<CustomHandle />}
topHandle={false}
bottomHandle={true}
onResizeStart={(direction) => {
console.log(`Resize started in the ${direction} direction`)
}}
onResizeStop={(direction) => {
console.log(`Resize stopped in the ${direction} direction`)
}}
onResize={(direction, width, height, widthDelta, heightDelta) => {
console.log(`Resizing in the ${direction} direction`);
console.log(`New Size: ${width}x${height}`);
console.log(`Delta: ${widthDelta}x${heightDelta}`);
}}
debounce={200}
>
<ContentComponent />
</Resizable>
leftHandle
boolean | JSX.Element
rightHandle
boolean | JSX.Element
topHandle
boolean | JSX.Element
bottomHandle
boolean | JSX.Element
onResizeStart
(direction: ResizeDirection) => void
direction
: The direction in which resizing is happening.onResizeStop
(direction: ResizeDirection) => void
direction
: The direction in which resizing is happening.onResize
(direction: ResizeDirection, width: number, height: number, widthDelta: number, heightDelta: number) => void
direction
: The direction in which resizing is happening.width
: The new width of the resizable element.height
: The new height of the resizable element.widthDelta
: The change in width.heightDelta
: The change in height.style
Omit<Omit<JSX.CSSProperties, 'display'>, 'flex-direction'>
display
and flex-direction
are not allowed.debounce
number
1
.children
JSX.Element
ResizeDirection
'top' | 'bottom' | 'left' | 'right'
You can pass a custom JSX element to be used as a handle:
const CustomHandle = () => <div className="custom-handle">||</div>;
<Resizable
rightHandle={<CustomHandle />}
>
<ContentComponent />
</Resizable>
onResizeStart
: Triggered when resizing starts.onResizeStop
: Triggered when resizing stops.onResize
: Triggered during resizing to provide updated size information.You can pass custom styles to the Resizable
component using the style
prop. Note that display
and flex-direction
properties are not allowed to be set via the style
prop. You can also specify min-width
, max-width
, min-height
, and max-height
to set bounds for resizability.
<Resizable
style={{
border: '2px dashed red',
'min-width': '100px',
'max-width: '500px',
'min-height': '100px',
'max-height': '500px'
}}
>
<ContentComponent />
</Resizable>
The debounce
prop can be used to control the frequency of resize event callbacks. By default, this delay is set to 1
millisecond.
<Resizable debounce={100}>
<ContentComponent />
</Resizable>
FAQs
A `Resizable` component to resize its content by dragging handles on its edges.
The npm package solid-resizable receives a total of 7 weekly downloads. As such, solid-resizable popularity was classified as not popular.
We found that solid-resizable demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.