Web: Components: icon-button: Moved styles to a separate file.
This commit is contained in:
parent
3562b429d7
commit
37879c1fba
@ -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);
|
||||
|
@ -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;
|
Loading…
Reference in New Issue
Block a user