Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UX-342 Support prop on Modal.Content #647

Merged
merged 1 commit into from
Sep 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions packages/matchbox/src/components/Modal/Content.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ const Content = React.forwardRef(function Content(props, ref) {
const systemProps = pick(rest, padding.propNames);

return (
<Box data-id="modal-content" {...systemProps} maxHeight="60vh" overflowY="auto" ref={ref}>
<Box
data-id="modal-content"
p="500"
{...systemProps}
maxHeight="60vh"
overflowY="auto"
ref={ref}
>
{children}
</Box>
);
Expand All @@ -23,8 +30,4 @@ Content.propTypes = {
...createPropTypes(padding.propNames),
};

Content.defaultProps = {
p: '500',
};

export default Content;
2 changes: 1 addition & 1 deletion stories/overlays/Modal.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const LEGACY = withInfo()(() => (
export const SystemProps = withInfo()(() => (
<Modal p={800} showCloseButton open portalId={PORTAL_ID}>
<Modal.Header showCloseButton>Modal Title</Modal.Header>
<Modal.Content p="800">
<Modal.Content padding="800">
<Box bg="blue.300" p="300">
Modal Content
</Box>
Expand Down