pcm-shared-components 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
3
+ import '../../styles/tailwind.css';
4
+
5
+ import { Button } from './index';
6
+
7
+ const Component: ComponentMeta<typeof Button> = {
8
+ title: 'Example/Button',
9
+ component: Button,
10
+ argTypes: {
11
+ backgroundColor: { control: 'color' },
12
+ },
13
+ };
14
+
15
+ export default Component;
16
+
17
+ const Template: ComponentStory<typeof Button> = (args) => <Button {...args} />;
18
+
19
+ export const Primary = Template.bind({});
20
+ Primary.args = {};
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ export interface ButtonProps {}
3
+ import "../../styles/tailwind.css";
4
+
5
+ export const Button = (props: ButtonProps) => {
6
+ return (
7
+ <button
8
+ type="button"
9
+ className="relative inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500"
10
+ >
11
+ Button
12
+ </button>
13
+ );
14
+ };
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "pcm-shared-components",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
+ "private": false,
4
5
  "main": "dist/index.cjs.js",
5
6
  "module": "dist/index.es.js",
6
7
  "types": "dist/index.d.ts",
@@ -18,7 +19,9 @@
18
19
  "scripts": {
19
20
  "publishme": "npm publish",
20
21
  "storybook": "start-storybook -p 6006",
21
- "build-storybook": "build-storybook"
22
+ "build-storybook": "build-storybook",
23
+ "clean": "rm -Rf dist",
24
+ "compile": "npm run clean && cross-env NODE_ENV=production babel src/components --out-dir dist --copy-files --ignore __tests__,spec.js,test.js,stories.js,__snapshots__"
22
25
  },
23
26
  "peerDependencies": {
24
27
  "react": "^17.0.2",
@@ -26,21 +29,26 @@
26
29
  "tailwindcss": "^3.0.1"
27
30
  },
28
31
  "devDependencies": {
29
- "@babel/core": "^7.16.0",
32
+ "@babel/cli": "^7.17.6",
33
+ "@babel/core": "^7.17.5",
34
+ "@babel/preset-env": "^7.16.11",
35
+ "@babel/preset-react": "^7.16.7",
36
+ "@rollup/plugin-babel": "^5.3.1",
30
37
  "@storybook/addon-actions": "^6.4.9",
31
38
  "@storybook/addon-essentials": "^6.4.9",
32
39
  "@storybook/addon-links": "^6.4.9",
40
+ "@storybook/addon-postcss": "^2.0.0",
33
41
  "@storybook/react": "^6.4.9",
34
42
  "autoprefixer": "^10.4.0",
35
43
  "babel-loader": "^8.2.3",
36
44
  "postcss": "^8.4.4",
45
+ "postcss-import": "^14.0.2",
37
46
  "react": "^17.0.2",
38
47
  "react-dom": "^17.0.2",
39
48
  "sass": "^1.32.6",
40
49
  "tailwindcss": "^3.0.1",
41
- "tailwindcss-dir": "^4.0.0",
42
- "@storybook/addon-postcss": "^2.0.0",
43
- "postcss-import": "^14.0.2"
50
+ "cross-env": "^7.0.3",
51
+ "tailwindcss-dir": "^4.0.0"
44
52
  },
45
53
  "dependencies": {
46
54
  "@mdi/js": "^6.5.95",