Skip to content

Commit

Permalink
chore: replace flex props
Browse files Browse the repository at this point in the history
  • Loading branch information
golcinho committed Sep 30, 2020
1 parent 905f500 commit 59da87e
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const InlineAlert: React.FC<InlineAlertProps> = memo(({ className, style,
const renderedActions = useMemo(
() =>
props.actions && (
<StyledActionsWrapper marginTop="xSmall">
<StyledActionsWrapper flexDirection="row" flexWrap="wrap" marginTop="xSmall">
{props.actions.map(({ text, variant = 'secondary', ...actionProps }, index) => (
<Button
key={index}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,12 @@ exports[`renders actions 1`] = `
-webkit-box-align: stretch;
-ms-flex-align: stretch;
align-items: stretch;
-webkit-flex-wrap: nowrap;
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
-webkit-flex-direction: row;
-ms-flex-direction: row;
flex-direction: row;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-webkit-box-pack: start;
-webkit-justify-content: flex-start;
-ms-flex-pack: start;
Expand Down Expand Up @@ -579,33 +582,11 @@ exports[`renders actions 1`] = `
}
.c10 {
-webkit-flex-direction: row;
-ms-flex-direction: row;
flex-direction: row;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
margin-bottom: -0.5rem;
margin-left: -0.25rem;
margin-right: -0.25rem;
}
@media (min-width:0px) {
.c9 {
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
}
}
@media (min-width:720px) {
.c9 {
-webkit-flex-direction: row;
-ms-flex-direction: row;
flex-direction: row;
}
}
@media (min-width:720px) {
.c11 + .bd-button {
margin-top: 0;
Expand Down
2 changes: 0 additions & 2 deletions packages/big-design/src/components/InlineAlert/styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ export const StyledLink = styled(Link)`
`;

export const StyledActionsWrapper = styled(Flex)`
flex-direction: row;
flex-wrap: wrap;
margin-bottom: -${({ theme }) => theme.spacing.xSmall};
margin-left: -${({ theme }) => theme.spacing.xxSmall};
margin-right: -${({ theme }) => theme.spacing.xxSmall};
Expand Down
2 changes: 1 addition & 1 deletion packages/big-design/src/components/Message/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const Message: React.FC<MessageProps> = memo(({ className, style, header,
const renderedActions = useMemo(
() =>
props.actions && (
<StyledActionsWrapper marginTop="xSmall">
<StyledActionsWrapper flexDirection="row" flexWrap="wrap" marginTop="xSmall">
{props.actions.map(({ text, variant = 'secondary', ...actionProps }, index) => (
<Button
key={index}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,12 @@ exports[`renders actions 1`] = `
-webkit-box-align: stretch;
-ms-flex-align: stretch;
align-items: stretch;
-webkit-flex-wrap: nowrap;
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
-webkit-flex-direction: row;
-ms-flex-direction: row;
flex-direction: row;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-webkit-box-pack: start;
-webkit-justify-content: flex-start;
-ms-flex-pack: start;
Expand Down Expand Up @@ -574,33 +577,11 @@ exports[`renders actions 1`] = `
}
.c10 {
-webkit-flex-direction: row;
-ms-flex-direction: row;
flex-direction: row;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
margin-bottom: -0.5rem;
margin-left: -0.25rem;
margin-right: -0.25rem;
}
@media (min-width:0px) {
.c9 {
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
}
}
@media (min-width:720px) {
.c9 {
-webkit-flex-direction: row;
-ms-flex-direction: row;
flex-direction: row;
}
}
@media (min-width:720px) {
.c11 + .bd-button {
margin-top: 0;
Expand Down
2 changes: 0 additions & 2 deletions packages/big-design/src/components/Message/styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ export const StyledLink = styled(Link)`
`;

export const StyledActionsWrapper = styled(Flex)`
flex-direction: row;
flex-wrap: wrap;
margin-bottom: -${({ theme }) => theme.spacing.xSmall};
margin-left: -${({ theme }) => theme.spacing.xxSmall};
margin-right: -${({ theme }) => theme.spacing.xxSmall};
Expand Down

0 comments on commit 59da87e

Please sign in to comment.