Web: Components: icon-button: Moved styles to a separate file.

This commit is contained in:
TatianaLopaeva 2021-02-09 18:21:39 +03:00
parent 3562b429d7
commit 37879c1fba
2 changed files with 14 additions and 9 deletions

View File

@ -1,17 +1,10 @@
import React from "react";
import PropTypes from "prop-types";
import styled from "styled-components";
import { Icons } from "../icons";
import isEmpty from "lodash/isEmpty";
import StyledOuter from "./styled-icon-button";
const StyledOuter = styled.div`
width: ${(props) =>
props.size ? Math.abs(parseInt(props.size)) + "px" : "20px"};
cursor: ${(props) =>
props.isDisabled || !props.isClickable ? "default" : "pointer"};
line-height: 0;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
`;
class IconButton extends React.PureComponent {
constructor(props) {
super(props);

View File

@ -0,0 +1,12 @@
import styled from "styled-components";
const StyledOuter = styled.div`
width: ${(props) =>
props.size ? Math.abs(parseInt(props.size)) + "px" : "20px"};
cursor: ${(props) =>
props.isDisabled || !props.isClickable ? "default" : "pointer"};
line-height: 0;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
`;
export default StyledOuter;