Skip to content

Commit

Permalink
chore(message): Wrap icon in box to apply correct styling (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChefHutch authored Jul 19, 2021
1 parent 7bff4b5 commit 36a0437
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/pancake-uikit/src/components/Message/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from "react";
import styled from "styled-components";
import { variant as systemVariant, space } from "styled-system";
import { WarningIcon, ErrorIcon } from "../Svg";
import { Box } from "../Box";
import { MessageProps } from "./types";
import variants from "./theme";

Expand All @@ -17,10 +18,6 @@ const MessageContainer = styled.div<MessageProps>`
border-radius: 16px;
border: solid 1px;
svg {
align-self: flex-start;
}
${space}
${systemVariant({
variants,
Expand All @@ -31,7 +28,9 @@ const Message: React.FC<MessageProps> = ({ children, variant, ...props }) => {
const Icon = Icons[variant];
return (
<MessageContainer variant={variant} {...props}>
<Icon color={variants[variant].borderColor} width="24px" mr="12px" style={{ alignSelf: "center" }} />
<Box>
<Icon color={variants[variant].borderColor} width="24px" mr="12px" />
</Box>
{children}
</MessageContainer>
);
Expand Down

0 comments on commit 36a0437

Please sign in to comment.