Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@rsuite/react-frame
Advanced tools
基于 Rsuite 封装的 Frame 结构。
<Frame>
包含:
<Frame.Nav>
显示侧边栏。包括产品列表、左侧菜单栏。其中菜单栏需要由使用者自行传入<Frame.Content>
Content 内容区域安装
yarn add @rsuite/react-frame
// 或
npm install @rsuite/react-frame
引入 less
@import '~@rsuite/rsuite-frame/lib/styles/less/index.less';
在代码中引入
import Frame from 'rsuite-frame';
Frame 结构如下:
其中 Frame 固定的是 1、2、3 部分。使用者可以自行传入菜单栏和 content 内容。
<Frame>
<Frame.Nav
logo={this.getLogo()}
iconName="DMP-color"
expand={expand}
activeName="Insight"
>
// 这里是菜单栏的代码
</Frame.Nav>
<Frame.Content>content</Frame.Content>
</Frame>
<Frame>
Name | Type | Description |
---|---|---|
children | React.Node | |
className | string | |
style | Object |
<Frame.Nav>
Name | Type | Description |
---|---|---|
brand | React.Node | 侧边栏收起状态下显示的 Icon |
children | React.Node | |
className | string | |
expand | boolean | (受控)侧边栏的是否展开的状态 |
onExpand | () => void | 侧边栏展开关闭回调 |
onRenderBottomNav | ()=> void | 底部侧边栏渲染方法 |
renderTitle | () => any | 标题 |
showMenu | boolean | 是否隐藏菜单 |
style | Object |
AppType
:
type AppType = {
name: string,
code?: string,
url: string
}
activeName
和 activeCode
取其一即可。
其中 <Frame.Nav>
的大部分 props 都来自于 rsuite-grid-sidebar
,具体的说明及用法可以看 rsuite-grid-sidebar 的文档
<Frame.Content>
Name | Type | Description |
---|---|---|
children | React.Node | |
className | string | |
style | Object |
FAQs
react frame
We found that @rsuite/react-frame demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.