Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@zendeskgarden/container-splitter
Advanced tools
Containers relating to Splitter in the Garden Design System
This package includes containers relating to Splitter in the Garden Design System.
npm install @zendeskgarden/container-splitter
This container implements the window splitter design pattern and can be used to build a splitter component. Check out storybook for live examples.
The useSplitter
hook manages positioning and required
accessibility attributes for the window splitting separator.
import {
useSplitter,
SplitterType,
SplitterOrientation,
SplitterPosition
} from '@zendeskgarden/container-splitter';
const Splitter = () => {
const { getSeparatorProps, getPrimaryPaneProps, valueNow } = useSplitter({
label: 'primary-pane',
type: SplitterType.VARIABLE,
orientation: SplitterOrientation.VERTICAL,
min: 50,
max: 100,
position: SplitterPosition.TRAILS,
environment: window
});
const separatorProps = getSeparatorProps();
const primaryPaneProps = getPrimaryPaneProps();
return (
<div style={{ display: 'flex' }}>
<div {...primaryPaneProps} style={{ flex: `0 0 ${valueNow}px` }}>
<p>Primary Pane</p>
</div>
<div style={{ flex: '0 0 5px' }} {...separatorProps} />
<div style={{ flex: '1 1 auto' }}>
<p>Secondary Pane</p>
</div>
</div>
);
};
SplitterContainer
is a render-prop wrapper for the useSplitter
hook.
import {
SplitterContainer,
SplitterType,
SplitterOrientation,
SplitterPosition
} from '@zendeskgarden/container-splitter';
<SplitterContainer
label="primary-pane"
type={SplitterType.VARIABLE}
orientation={SplitterOrientation.VERTICAL}
min={50}
max={100}
position={SplitterPosition.TRAILS}
environment={window}
>
{({ getSeparatorProps, getPrimaryPaneProps, valueNow }) => {
const separatorProps = getSeparatorProps();
const primaryPaneProps = getPrimaryPaneProps();
return (
<div id="container" style={{ display: 'flex' }}>
<div {...primaryPaneProps} style={{ flex: `0 0 ${valueNow}px` }}>
<p>Primary Pane</p>
</div>
<div style={{ flex: '0 0 5px' }} {...separatorProps} />
<div style={{ flex: '1 1 auto' }}>
<p>Secondary Pane</p>
</div>
</div>
);
}}
</SplitterContainer>;
FAQs
Containers relating to Splitter in the Garden Design System
The npm package @zendeskgarden/container-splitter receives a total of 57,681 weekly downloads. As such, @zendeskgarden/container-splitter popularity was classified as popular.
We found that @zendeskgarden/container-splitter 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.
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.