diff --git a/package.json b/package.json index 1b0f243..392e70d 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,6 @@ "name": "rstrtt", "version": "0.10.0", "description": "Dead simple CSS framework.", - "main": "dist/rstrtt.css", "scripts": { "start": "parcel src/index.html --open", "test": "react-scripts test" @@ -23,8 +22,8 @@ "dependencies": { "color-preset": "^1.0.1", "cssnano": "^5.0.2", - "parcel": "^2.0.0-beta.2", - "postcss": "^8.2.13", + "parcel": "^2.0.0-nightly.952", + "postcss": "^8.4.5", "postcss-cssnext": "^3.1.0", "postcss-import": "^14.0.1", "postcss-mixins": "^7.0.3", @@ -33,6 +32,7 @@ "react-dom": "^17.0.2" }, "devDependencies": { + "@babel/core": "^7.16.5", "@babel/preset-env": "^7.14.0", "@babel/preset-react": "^7.13.13", "@testing-library/jest-dom": "^5.11.4", @@ -49,6 +49,7 @@ "eslint-plugin-promise": "^5.1.0", "eslint-plugin-react": "^7.24.0", "react-scripts": "^4.0.3", - "standard": "^16.0.3" + "standard": "^16.0.3", + "typescript": "^4.5.4" } } diff --git a/src/components/button.tsx b/src/components/button.tsx new file mode 100644 index 0000000..e40f3bd --- /dev/null +++ b/src/components/button.tsx @@ -0,0 +1,27 @@ +'use strict' + +import * as React from 'react' +import '../css/rstrtt.css' + +const classNames = { + primary: 'btn btn-primary', + success: 'btn btn-success', + info: 'btn btn-info', + warning: 'btn btn-warning', + error: 'btn btn-error', + block: 'btn btn-primary btn-block', + 'btn-ghost': 'btn btn-default btn-ghost', + 'primary-ghost': 'btn btn-primary btn-ghost', + 'success-ghost': 'btn btn-success btn-ghost', + 'info-ghost': 'btn btn-info btn-ghost', + 'warning-ghost': 'btn btn-warning btn-ghost', + 'error-ghost': 'btn btn-error btn-ghost', + default: 'btn btn-defaul' +} + +const Button = (props: { type: string; value: string; onClick: any }) => { + const { type, value, onClick } = props + return