New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@brucelikk/brc-ui-react

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brucelikk/brc-ui-react

一个狠好使的React + TS组件库! / a React+TS based highly popular management component ui lib!

latest
npmnpm
Version
1.0.9
Version published
Maintainers
1
Created
Source

@安装使用

安装BRC UI

# 没有安装nrm源管理工具时...
npm i -g nrm

# NPM全局切换到官方源
nrm use npm

# 安装BRC UI/React
npm i @brucelikk/brc-ui-react

使用BRC弹窗

import React, { useState } from "react";

// 引入BRC弹窗
import { BrcPopup } from "@brucelikk/brc-ui-react";

export default function PopupDemo() {
  // 用一个state控制要不要显示弹窗
  const [showPopup, setShowPopup] = useState(false);

  return (
    <div>
      <h3>PopupDemo</h3>
      <button onClick={() => setShowPopup(true)}>显示弹窗</button>

      {/* 需要时显示弹窗显示弹窗 */}
      {showPopup && (
        // closer={setShowPopup} 告诉组件哪个state在控制弹窗的显隐 它好在必要时帮你关闭弹窗
        // title="我的弹窗" 弹窗标题
        // onConfirm={() => console.log("已确定")} 点击确定时的回调
        // <p>This is a modal content</p> 自定义弹窗内容
        <BrcPopup
          closer={setShowPopup}
          title="我的弹窗"
          onConfirm={() => console.log("已确定")}
        >
          <p>This is a modal content</p>
        </BrcPopup>
      )}
    </div>
  );
}

使用BRC递归菜单

import {} from "react";
import "./App.css";
import {BrcRecursiveMenu} from "@brucelikk/brc-ui-react";
import menuItems from "./assets/menuItems";
function App() {
  return (
    <>
      <div className="wrapper">
        <div className="nav">
          <BrcRecursiveMenu items={menuItems} />
        </div>
      </div>
    </>
  );
}

export default App;

Keywords

table

FAQs

Package last updated on 13 Aug 2023

Did you know?

Socket

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.

Install

Related posts