Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@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
The npm package @rsuite/react-frame receives a total of 0 weekly downloads. As such, @rsuite/react-frame popularity was classified as not popular.
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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.