
Security News
US Government Forces Anthropic to Pull Claude Fable Days After Launch
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.
@_nu/react-switch
Advanced tools
无 UI 依赖的 Swith 组件。
a;button will got type="button" as default;<string> and title will be children as default;button will got role="button"yarn add @_nu/react-button @_nu/css-button
/* @components/Button/index.js */
import "@_nu/css-button"; // core style
import "@_nu/css-button/css/skins/bootstrap.css"; // skin of bootstrap
import './style.css'; // custome style
import NuButton from "@_nu/react-button"; // import
// Add default class
NuButton.defaultProps.onBeforeReturn = ({className='', props})=> ({
className:`nu_btn ${className}`
...props
});
export default NuButton;
<Button className="_fill _primay">Button</Button>
<Button className="_fill _primay" href="/nu-button">Link Button</Button>
<Button component="strong" className="_fill _primay">Button</Button>
| Prop | type | Default | Function |
|---|---|---|---|
| href | string | ' ' | href for a |
| Component | string | func | object | 'button' | tagName |
<Button className="_fill">hello</Button>
<Button className="_fill" component="strong">hello</Button>
<Button className="_fill"><strong>hello</strong></Button>
<Button className="_fill" disabled>hello</Button>
<Button className="_fill _primary">hello</Button>
<Button className="_fill _primary" href="." title="hello">hello</Button>
=>
<button class="nu_btn _fill" type="button" title="hello">hello</button>
<strong class="nu_btn _fill" role="button" title="hello">hello</strong>
<button class="nu_btn _fill" type="button"><strong>hello</strong></button>
<button class="nu_btn _fill" type="button" disabled title="hello">hello</button>
<button class="nu_btn _fill _primary" type="button" title="hello">hello</button>
<a class="nu_btn _fill _primary" role="button" href="." title="hello">hello</a>
| defaultProps | type | Default | Function |
|---|---|---|---|
| onBeforeReturn | function | (props)=> props | custom props on before return |
Go to @_nu/css-button
// How to start
npm test
// generate coverage report
npm run test:coverage
FAQs
No UI dependency switch of react
The npm package @_nu/react-switch receives a total of 21 weekly downloads. As such, @_nu/react-switch popularity was classified as not popular.
We found that @_nu/react-switch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.