This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { action } from '@storybook/addon-actions'; | |
import Button from '../src/components/Button'; | |
export default { | |
title: 'Button', | |
}; | |
export const text = () => <Button text="Hello Button" onClick={action('clicked')} />; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "my-own-components-library", | |
"version": "0.1.0", | |
"private": false, | |
"dependencies": {}, | |
"peerDependencies": { | |
"react": "^16.9.0", | |
"react-dom": "^16.9.0" | |
}, | |
"devDependencies": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$primaryColor: #cce5ff; | |
$secondaryColor: #e2e3e5; | |
$successColor: #d4edda; | |
$dangerColor: #f8d7da; | |
$warningColor: #fff3cd; | |
$infoColor: #d1ecf1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import '../../styles/variables.scss'; | |
.alert { | |
position: relative; | |
padding: .75rem 1.25rem; | |
margin-bottom: 1rem; | |
border: 1px solid transparent; | |
border-radius: .25rem; | |
width: fit-content; | |
&.primary { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component, CSSProperties } from 'react'; | |
import Link from './Link'; | |
type AlertProps = { | |
text: string, | |
bgColor?: string, | |
link?: string | |
} | |
const css: CSSProperties = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component, CSSProperties } from 'react'; | |
type LinkProps = { | |
link: string | |
} | |
const css: CSSProperties = { | |
fontSize: 16, | |
color: '#000000', | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"bit": { | |
"env": { | |
"compiler": "bit.envs/compilers/[email protected]", | |
"tester": "bit.envs/testers/[email protected]" | |
}, | |
"componentsDefaultDirectory": "components/{name}", | |
"packageManager": "npm", | |
"overrides": { | |
"*": { | |
"dependencies": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//IMPORTANT - install thie before: npm i child-process-promise --save-dev | |
/* | |
put this in your package.json script: | |
"import-all": "node import-all.js" | |
npm run import-all <user>.<collection> amount | |
*/ | |
const exec = require('child-process-promise').exec; | |
const args = process.argv; |