@magusn/components
Advanced tools
| import * as React from 'react'; | ||
| export function Button(props) { | ||
| return <button style={{ lineHeight: '24px' }}>{props.children}</button>; | ||
| } |
| import React from 'react'; | ||
| import styles from './styles.module.css'; | ||
| export function ExampleComponent({ text }) { | ||
| return <div className={styles.test}>Example Component: {text}</div>; | ||
| } |
| import { ExampleComponent } from '..'; | ||
| describe('ExampleComponent', () => { | ||
| it('is truthy', () => { | ||
| expect(ExampleComponent).toBeTruthy(); | ||
| }); | ||
| }); |
| export { ExampleComponent } from './ExampleComponent'; |
| /* add css module styles here (optional) */ | ||
| .test { | ||
| margin: 2em; | ||
| padding: 0.5em; | ||
| border: 2px solid #000; | ||
| font-size: 2em; | ||
| text-align: center; | ||
| } |
+6
-6
| { | ||
| "name": "@magusn/components", | ||
| "version": "0.2.0", | ||
| "version": "0.2.1", | ||
| "gitHead": "e949250e8467604cb71f28d0da995accb467a01d", | ||
| "description": "common components", | ||
@@ -9,2 +10,5 @@ "author": "magus", | ||
| "main": "src/index.js", | ||
| "files": [ | ||
| "src" | ||
| ], | ||
| "engines": { | ||
@@ -45,7 +49,3 @@ "node": ">=10" | ||
| "react-scripts": "^3.4.1" | ||
| }, | ||
| "files": [ | ||
| "dist" | ||
| ], | ||
| "gitHead": "878461759590409d2ab4400d7990e6de2717addf" | ||
| } | ||
| } |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
2795
33.03%8
166.67%26
1200%0
-100%