
Security News
Static vs. Runtime Reachability: Insights from Latio’s On the Record Podcast
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
redux-react-collapse-pane
Advanced tools
Install redux-react-collapse-pane: ```bash npm i redux-react-collapse-pane
Install redux-react-collapse-pane:
npm i redux-react-collapse-pane
# or for yarn
yarn add redux-react-collapse-pane
Once installed you can import the CollapsePane
component in your code.
import { CollapsePane } from "redux-react-collapse-pane";
To resize your components you need to wrap it out with CollapsePane frame. The idea of this implementation of pane is to control the collapsing and resizing from the parent component. This will enable you to persist collapse pane in redux and update the pane from redux state.
The required props are:
<CollapsePane
childSizes={sizes}
collapsedSize={100}
onSizeChanged={(sizes: [number, number]) => onSizeChanged(sizes)}
collapsed={collapsed}
onCollapse={() => onCollapse()}
onExpand={() => onExpand()}
>
<div>First</div>
<div>Second</div>
</CollapsePane>
This will be vertical panel, it's left element will be collapsible.
export interface CollapsePaneProps {
collapsed: boolean,
/**
* this sizes are relative
* ex: [1,2] second element is two times bigger than the first
*/
childSizes: [number, number];
/** this size is absolute, and is using for collapsed element */
collapsedSize: number;
onSizeChanged: (sizes: [number, number]) => void;
/** by default vertical */
horizontal?: boolean;
/** if horizontal inverted collapse pane will collapse left element
* if vertical inverted collapse pane will collapse bottom element
*/
inverted?: boolean;
// you can use custom collapse button
collapseButton?: React.ReactElement;
// you can use custom expand button
expandButton?: React.ReactElement;
// color of the separator line
separatorColor?: string;
// color of the moving separator line
movingSeparatorColor?: string;
// width of the separator line
separatorWidth?: number;
onCollapse: () => void;
onExpand: () => void;
/**
* offset in % from top to bottom or from left to right, 50 is center
*/
collapseButtonOffset?: number;
/**
* positions in pixels left to right and top to bottom in which the delimiter will be snapped
*/
snapPoints?: number[];
children: [React.ReactChild, React.ReactChild]
}
FAQs
Install redux-react-collapse-pane: ```bash npm i redux-react-collapse-pane
The npm package redux-react-collapse-pane receives a total of 0 weekly downloads. As such, redux-react-collapse-pane popularity was classified as not popular.
We found that redux-react-collapse-pane 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
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.