Skip to content

Commit

Permalink
[Box] Remove component from TypeMap (mui#38168)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldudak authored Jul 31, 2023
1 parent 5bac8b3 commit de38693
Show file tree
Hide file tree
Showing 3 changed files with 165 additions and 5 deletions.
5 changes: 0 additions & 5 deletions packages/mui-system/src/Box/Box.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,6 @@ export interface BoxTypeMap<P = {}, D extends React.ElementType = 'div', T exten
props: P &
SystemProps<T> & {
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
161 changes: 161 additions & 0 deletions packages/mui-system/test/typescript/moduleAugmentation/boxSx.spec.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
import * as React from 'react';
import Box from '@mui/system/Box';

// https://github.com/mui/material-ui/issues/34068

declare global {
namespace JSX {
interface IntrinsicElements {
test1: number;
test2: number;
test3: number;
test4: number;
test5: number;
test6: number;
test7: number;
test8: number;
test9: number;
test10: number;
test11: number;
test12: number;
test13: number;
test14: number;
test15: number;
test16: number;
test17: number;
test18: number;
test19: number;
test20: number;
test21: number;
test22: number;
test23: number;
test24: number;
test25: number;
test26: number;
test27: number;
test28: number;
test29: number;
test30: number;
test31: number;
test32: number;
test33: number;
test34: number;
test35: number;
test36: number;
test37: number;
test38: number;
test39: number;
test40: number;
test41: number;
test42: number;
test43: number;
test44: number;
test45: number;
test46: number;
test47: number;
test48: number;
test49: number;
test50: number;
test51: number;
test52: number;
test53: number;
test54: number;
test55: number;
test56: number;
test57: number;
test58: number;
test59: number;
test60: number;
test61: number;
test62: number;
test63: number;
test64: number;
test65: number;
test66: number;
test67: number;
test68: number;
test69: number;
test70: number;
test71: number;
test72: number;
test73: number;
test74: number;
test75: number;
test76: number;
test77: number;
test78: number;
test79: number;
test80: number;
test81: number;
test82: number;
test83: number;
test84: number;
test85: number;
test86: number;
test87: number;
test88: number;
test89: number;
test90: number;
test91: number;
test92: number;
test93: number;
test94: number;
test95: number;
test96: number;
test97: number;
test98: number;
test99: number;
test100: number;
test101: number;
test102: number;
test103: number;
test104: number;
test105: number;
test106: number;
test107: number;
test108: number;
test109: number;
test110: number;
test111: number;
test112: number;
test113: number;
test114: number;
test115: number;
test116: number;
test117: number;
test118: number;
test119: number;
test120: number;
test121: number;
test122: number;
test123: number;
test124: number;
test125: number;
test126: number;
test127: number;
test128: number;
test129: number;
test130: number;
test131: number;
test132: number;
test133: number;
test134: number;
test135: number;
test136: number;
test137: number;
test138: number;
test139: number;
}
}
}

function Test() {
return (
<div>
<Box />
<Box sx={{ m: 1, p: 1 }} />
<Box component="span" />
<Box component="span" sx={{ m: 1, p: 1 }} />
</div>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "../../../../../tsconfig",
"files": ["boxSx.spec.tsx"]
}

0 comments on commit de38693

Please sign in to comment.