Skip to content

Commit

Permalink
fix: styled components order
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Oliveira committed Mar 22, 2019
1 parent 1090fb4 commit 4932b13
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions components/Alert/Alert.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import Button from '../Button';
import Colors from '../Colors';
import Icon from '../Icon';
import Button from '../Button';

const BORDER_SIZE = '1.5px';
const DEFAULT_SPACING = '16px';
Expand All @@ -16,6 +16,22 @@ const Content = styled.div`

const AlertIcon = styled(Icon)``;

const CloseButton = styled(Button.Icon).attrs({
icon: 'close',
})`
height: auto;
width: auto;
margin: 0 0 0 ${DEFAULT_SPACING};
padding: 0;
opacity: 0.8;
transition: opacity 0.4s ease;
:hover {
background: none;
opacity: 1;
}
`;

const getStylesBySkin = skin => {
const colorSchema = skin.toUpperCase();

Expand Down Expand Up @@ -43,22 +59,6 @@ const Wrapper = styled.div`
${({ skin }) => getStylesBySkin(skin)}
`;

const CloseButton = styled(Button.Icon).attrs({
icon: 'close',
})`
height: auto;
width: auto;
margin: 0 0 0 ${DEFAULT_SPACING};
padding: 0;
opacity: 0.8;
transition: opacity 0.4s ease;
:hover {
background: none;
opacity: 1;
}
`;

CloseButton.displayName = 'CloseButton';

const Alert = ({ icon, children, onClose, ...rest }) => (
Expand Down

0 comments on commit 4932b13

Please sign in to comment.