diff --git a/package.json b/package.json index 0d80e4a7f..f4d8bf6d1 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,13 @@ "@fortawesome/fontawesome-svg-core": "^1.2.32", "@fortawesome/free-solid-svg-icons": "^5.15.1", "@fortawesome/react-fontawesome": "^0.1.11", + "@headlessui/react": "^1.6.4", + "@heroicons/react": "^1.0.6", + "@hot-loader/react-dom": "^16.14.0", "@tailwindcss/forms": "^0.5.2", "axios": "^0.21.1", "chart.js": "^2.8.0", + "classnames": "^2.3.1", "codemirror": "^5.57.0", "date-fns": "^2.16.1", "debounce": "^1.2.0", @@ -20,7 +24,7 @@ "i18next-xhr-backend": "^3.2.2", "qrcode.react": "^1.0.1", "query-string": "^6.7.0", - "react": "^16.13.1", + "react": "^16.14.0", "react-copy-to-clipboard": "^5.0.2", "react-dom": "npm:@hot-loader/react-dom", "react-fast-compare": "^3.2.0", @@ -64,9 +68,9 @@ "@types/node": "^14.11.10", "@types/qrcode.react": "^1.0.1", "@types/query-string": "^6.3.0", - "@types/react": "^16.9.41", + "@types/react": "^16.14.0", "@types/react-copy-to-clipboard": "^4.3.0", - "@types/react-dom": "^16.9.8", + "@types/react-dom": "^16.9.16", "@types/react-helmet": "^6.0.0", "@types/react-redux": "^7.1.1", "@types/react-router": "^5.1.3", @@ -103,7 +107,7 @@ "terser-webpack-plugin": "^4.2.3", "ts-essentials": "^9.1.2", "twin.macro": "^2.8.2", - "typescript": "^4.2.4", + "typescript": "^4.7.3", "webpack": "^4.43.0", "webpack-assets-manifest": "^3.1.1", "webpack-bundle-analyzer": "^3.8.0", diff --git a/resources/scripts/components/elements/button/Button.tsx b/resources/scripts/components/elements/button/Button.tsx new file mode 100644 index 000000000..55c8ca81b --- /dev/null +++ b/resources/scripts/components/elements/button/Button.tsx @@ -0,0 +1,36 @@ +import React, { forwardRef } from 'react'; +import classNames from 'classnames'; +import styles from './style.module.css'; + +export type ButtonProps = JSX.IntrinsicElements['button'] & { + square?: boolean; + small?: boolean; +} + +const Button = forwardRef( + ({ children, square, small, className, ...rest }, ref) => { + return ( + + ); + }, +); + +const TextButton = forwardRef(({ className, ...props }, ref) => ( + // @ts-expect-error +