Skip to content

Commit

Permalink
feat(Modal): remove flex-none from ModalFooter (#3816)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: visual breaking change on ModalFooter. Flex-none is no longer applied after largeMobile.
  • Loading branch information
DSil committed Apr 20, 2023
1 parent 2697f32 commit 8c3637c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
5 changes: 3 additions & 2 deletions docs/src/__examples__/Modal/FIXED_FOOTER.tsx
@@ -1,6 +1,7 @@
import React from "react";
import { FlightDirect } from "@kiwicom/orbit-components/icons";
import {
Box,
Button,
Stack,
Text,
Expand Down Expand Up @@ -132,9 +133,9 @@ export default {
</Stack>
</ModalSection>
<ModalFooter>
<Stack justify="end">
<Box display="flex" justify="end">
<Button>Save meals</Button>
</Stack>
</Box>
</ModalFooter>
</Modal>
);
Expand Down
5 changes: 4 additions & 1 deletion packages/orbit-components/src/ErrorForms.stories.tsx
Expand Up @@ -22,6 +22,7 @@ import TextLink from "./TextLink";
import Checkbox from "./Checkbox";
import Radio from "./Radio";
import Modal, { ModalHeader, ModalSection, ModalFooter } from "./Modal";
import Box from "./Box";

const objectOptions = [
{ value: 0, label: "Zero-th item" },
Expand Down Expand Up @@ -456,7 +457,9 @@ export const withModal = () => {
<Button iconLeft={<ChevronBackward />} type="secondary">
Back
</Button>
<Button fullWidth>Proceed to Payment (23.98€)</Button>
<Box display="flex" justify="end">
<Button>Proceed to Payment (23.98€)</Button>
</Box>
</ModalFooter>
</Modal>
);
Expand Down
5 changes: 4 additions & 1 deletion packages/orbit-components/src/Modal/Modal.stories.tsx
Expand Up @@ -26,6 +26,7 @@ import Checkbox from "../Checkbox";
import Radio from "../Radio";
import Tooltip from "../Tooltip";
import Tile from "../Tile";
import Box from "../Box";

import Modal, { ModalHeader, ModalSection, ModalFooter } from ".";

Expand Down Expand Up @@ -508,7 +509,9 @@ export const FullPreview = () => {
<ButtonLink type="secondary">Button</ButtonLink>
</Stack>
)}
<Button fullWidth>Continue to Payment</Button>
<Box justify="end" display="flex">
<Button>Continue to Payment</Button>
</Box>
</ModalFooter>
</Modal>
</Container>
Expand Down
4 changes: 0 additions & 4 deletions packages/orbit-components/src/Modal/ModalFooter/index.tsx
Expand Up @@ -16,10 +16,6 @@ const StyledChild = styled.div<{ flex?: Props["flex"] }>`
flex: ${flex};
box-sizing: border-box;
padding: ${rtlSpacing(`0 ${theme.orbit.spaceXSmall} 0 0`)};
${media.largeMobile(css`
flex: none;
`)};
`}
`;

Expand Down
5 changes: 4 additions & 1 deletion packages/orbit-components/src/SkipLink/SkipLink.stories.tsx
Expand Up @@ -7,6 +7,7 @@ import Text from "../Text";
import Card, { CardSection } from "../Card";
import Stack from "../Stack";
import Modal, { ModalHeader, ModalSection, ModalFooter } from "../Modal";
import Box from "../Box";
import Button from "../Button";
import Illustration from "../Illustration";
import ChevronBackward from "../icons/ChevronBackward";
Expand Down Expand Up @@ -252,7 +253,9 @@ export const WithinModal = () => (
<Button iconLeft={<ChevronBackward />} type="secondary">
Back
</Button>
<Button fullWidth>Proceed to Payment (23.98€)</Button>
<Box display="flex" justify="end">
<Button>Proceed to Payment (23.98€)</Button>
</Box>
</ModalFooter>
</Modal>
);
Expand Down

0 comments on commit 8c3637c

Please sign in to comment.