Explorar o código

fix: exporting button

poeti8 %!s(int64=6) %!d(string=hai) anos
pai
achega
c05a87f02f
Modificáronse 3 ficheiros con 1 adicións e 81 borrados
  1. 1 41
      client/components/Button.tsx
  2. 0 39
      package-lock.json
  3. 0 1
      package.json

+ 1 - 41
client/components/Button.tsx

@@ -1,13 +1,7 @@
-import React, { FC } from "react";
 import styled, { css } from "styled-components";
 import { switchProp, prop, ifProp } from "styled-tools";
 import { Flex, BoxProps } from "reflexbox/styled-components";
 
-// TODO: another solution for inline SVG
-import SVG from "react-inlinesvg";
-
-import { spin } from "../helpers/animations";
-
 interface Props extends BoxProps {
   color?: "purple" | "gray" | "blue" | "red";
   disabled?: boolean;
@@ -17,7 +11,7 @@ interface Props extends BoxProps {
   type?: "button" | "submit" | "reset";
 }
 
-const Button = styled(Flex)<Props>`
+export const Button = styled(Flex)<Props>`
   position: relative;
   align-items: center;
   justify-content: center;
@@ -62,40 +56,6 @@ const Button = styled(Flex)<Props>`
   }
 `;
 
-const Icon = styled(SVG)`
-  svg {
-    width: 16px;
-    height: 16px;
-    margin-right: 12px;
-    stroke: ${ifProp({ color: "gray" }, "#444", "#fff")};
-
-    ${ifProp(
-      { icon: "loader" },
-      css`
-        width: 20px;
-        height: 20px;
-        margin: 0;
-        animation: ${spin} 1s linear infinite;
-      `
-    )}
-
-    ${ifProp(
-      "isRound",
-      css`
-        width: 15px;
-        height: 15px;
-        margin: 0;
-      `
-    )}
-
-    @media only screen and (max-width: 768px) {
-      width: 12px;
-      height: 12px;
-      margin-right: 6px;
-    }
-  }
-`;
-
 Button.defaultProps = {
   as: "button",
   width: "auto",

+ 0 - 39
package-lock.json

@@ -7848,23 +7848,6 @@
         "sshpk": "^1.7.0"
       }
     },
-    "httpplease": {
-      "version": "0.16.4",
-      "resolved": "https://registry.npmjs.org/httpplease/-/httpplease-0.16.4.tgz",
-      "integrity": "sha1-04Lr4jDvUHkIC06f/r8xap51wNo=",
-      "requires": {
-        "urllite": "~0.5.0",
-        "xmlhttprequest": "*",
-        "xtend": "~3.0.0"
-      },
-      "dependencies": {
-        "xtend": {
-          "version": "3.0.0",
-          "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz",
-          "integrity": "sha1-XM50B7r2Qsunvs2laBEcST9ZZlo="
-        }
-      }
-    },
     "https-browserify": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz",
@@ -12117,15 +12100,6 @@
       "resolved": "https://registry.npmjs.org/react-ga/-/react-ga-2.5.7.tgz",
       "integrity": "sha512-UmATFaZpEQDO96KFjB5FRLcT6hFcwaxOmAJZnjrSiFN/msTqylq9G+z5Z8TYzN/dbamDTiWf92m6MnXXJkAivQ=="
     },
-    "react-inlinesvg": {
-      "version": "0.7.5",
-      "resolved": "https://registry.npmjs.org/react-inlinesvg/-/react-inlinesvg-0.7.5.tgz",
-      "integrity": "sha512-oaU/t2vjf8yNGj3y2G3uYsS58BDwTi2jz0FIbZel3JwuJq/3vwpTR5Bsvp9WfY6sWn+f0KBW2vQ8oDy7csifIg==",
-      "requires": {
-        "httpplease": "^0.16.4",
-        "once": "^1.4.0"
-      }
-    },
     "react-is": {
       "version": "16.8.6",
       "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.6.tgz",
@@ -14155,14 +14129,6 @@
         "tlds": "^1.187.0"
       }
     },
-    "urllite": {
-      "version": "0.5.0",
-      "resolved": "https://registry.npmjs.org/urllite/-/urllite-0.5.0.tgz",
-      "integrity": "sha1-G3u5yj+w25Ug3hE0ZrvPfMNBRRo=",
-      "requires": {
-        "xtend": "~4.0.0"
-      }
-    },
     "use": {
       "version": "3.1.1",
       "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
@@ -14517,11 +14483,6 @@
       "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=",
       "dev": true
     },
-    "xmlhttprequest": {
-      "version": "1.8.0",
-      "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz",
-      "integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw="
-    },
     "xtend": {
       "version": "4.0.1",
       "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",

+ 0 - 1
package.json

@@ -75,7 +75,6 @@
     "react-copy-to-clipboard": "^5.0.1",
     "react-dom": "^16.8.1",
     "react-ga": "^2.5.7",
-    "react-inlinesvg": "^0.7.5",
     "react-redux": "^6.0.0",
     "react-tippy": "^1.3.1",
     "react-tooltip": "^3.11.1",