Skip to content

Commit

Permalink
Revert "[Box] Remove component from TypeMap (#38168)" (#38356)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldudak authored Aug 7, 2023
1 parent 7408d97 commit 745bd53
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 166 deletions.
5 changes: 5 additions & 0 deletions packages/mui-system/src/Box/Box.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ export interface BoxTypeMap<
props: AdditionalProps &
SystemProps<Theme> & {
children?: React.ReactNode;
/**
* The component used for the root node.
* Either a string to use a HTML element or a component.
*/
component?: React.ElementType;
ref?: React.Ref<unknown>;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
Expand Down
14 changes: 13 additions & 1 deletion packages/mui-system/src/Box/Box.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { Box, Theme } from '@mui/system';
import { Box, Theme, styled } from '@mui/system';

interface TestProps {
test?: string;
Expand Down Expand Up @@ -104,3 +104,15 @@ function TestFillPropCallback() {
]}
/>;
}

const StyledBox = styled(Box)`
color: white;
`;

export default function StyledBoxWithSx() {
return (
<StyledBox component="span" sx={{ width: 300 }}>
Box
</StyledBox>
);
}
161 changes: 0 additions & 161 deletions packages/mui-system/test/typescript/moduleAugmentation/boxSx.spec.tsx

This file was deleted.

This file was deleted.

0 comments on commit 745bd53

Please sign in to comment.