From 4932b1309a07410dd2db045917861b63d1e860fb Mon Sep 17 00:00:00 2001 From: Alan Oliveira Date: Fri, 22 Mar 2019 13:52:44 -0300 Subject: [PATCH] fix: styled components order --- components/Alert/Alert.jsx | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/components/Alert/Alert.jsx b/components/Alert/Alert.jsx index 361159126..127e18ae0 100644 --- a/components/Alert/Alert.jsx +++ b/components/Alert/Alert.jsx @@ -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'; @@ -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(); @@ -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 }) => (