revert(ui-tookit): messages full-width and no tip
This commit is contained in:
parent
8b36f40e9d
commit
5d333c57a6
@ -3,7 +3,7 @@ import is from 'styled-is';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import remcalc from 'remcalc';
|
import remcalc from 'remcalc';
|
||||||
import { Col, Row } from 'joyent-react-styled-flexboxgrid';
|
|
||||||
import { H4 } from '../text/headings';
|
import { H4 } from '../text/headings';
|
||||||
import P from '../text/p';
|
import P from '../text/p';
|
||||||
import { Close } from '../icons';
|
import { Close } from '../icons';
|
||||||
@ -16,32 +16,6 @@ const Container = styled.div`
|
|||||||
border: ${remcalc(1)} solid ${props => props.theme.grey};
|
border: ${remcalc(1)} solid ${props => props.theme.grey};
|
||||||
border-radius: ${remcalc(3)};
|
border-radius: ${remcalc(3)};
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
&:before,
|
|
||||||
&:after {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
border-style: solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:before {
|
|
||||||
top: -${remcalc(7)};
|
|
||||||
right: ${remcalc(17)};
|
|
||||||
|
|
||||||
border-width: 0 ${remcalc(5.5)} ${remcalc(7)} ${remcalc(5.5)};
|
|
||||||
border-color: transparent transparent ${props => props.theme.grey}
|
|
||||||
transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:after {
|
|
||||||
top: -${remcalc(6)};
|
|
||||||
right: ${remcalc(18)};
|
|
||||||
border-width: 0 ${remcalc(4.5)} ${remcalc(6)} ${remcalc(4.5)};
|
|
||||||
border-color: transparent transparent ${props => props.theme.white}
|
|
||||||
transparent;
|
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const Color = styled.div`
|
const Color = styled.div`
|
||||||
@ -82,15 +56,11 @@ const CloseIcons = Close.extend`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
export const Message = ({ onCloseClick, children, ...type }) => (
|
export const Message = ({ onCloseClick, children, ...type }) => (
|
||||||
<Row>
|
|
||||||
<Col md={7} sm={12}>
|
|
||||||
<Container>
|
<Container>
|
||||||
<Color {...type} />
|
<Color {...type} />
|
||||||
<Outlet>{children}</Outlet>
|
<Outlet>{children}</Outlet>
|
||||||
{onCloseClick ? <CloseIcons onClick={onCloseClick} /> : null}
|
{onCloseClick ? <CloseIcons onClick={onCloseClick} /> : null}
|
||||||
</Container>
|
</Container>
|
||||||
</Col>
|
|
||||||
</Row>
|
|
||||||
);
|
);
|
||||||
|
|
||||||
export const Title = ({ children }) => <H4 noMargin>{children}</H4>;
|
export const Title = ({ children }) => <H4 noMargin>{children}</H4>;
|
||||||
|
Loading…
Reference in New Issue
Block a user