-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
526 additions
and
47 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
benchmark/browser/scenarios/sx-prop-box-material-ui/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import * as React from 'react'; | ||
import Box from '@material-ui/core/Box'; | ||
|
||
export default function BoxSxPropMaterialUI() { | ||
return ( | ||
<React.Fragment> | ||
{new Array(1000).fill().map(() => ( | ||
<Box | ||
sx={{ | ||
width: 200, | ||
height: 200, | ||
backgroundColor: [undefined, 'primary.light', 'primary.main', 'primary.dark'], | ||
borderWidth: '3px', | ||
borderColor: 'white', | ||
borderStyle: [undefined, 'dashed', 'solid', 'dotted'], | ||
':hover': { | ||
backgroundColor: (theme) => theme.palette.secondary.dark, | ||
}, | ||
}} | ||
> | ||
material-ui | ||
</Box> | ||
))} | ||
</React.Fragment> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import * as React from 'react'; | ||
import Button from '@material-ui/core/Button'; | ||
import Box from '@material-ui/core/Box'; | ||
|
||
export default function BoxClone() { | ||
return ( | ||
<Box border="1px dashed grey" clone> | ||
<Button>Save</Button> | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import * as React from 'react'; | ||
import Button from '@material-ui/core/Button'; | ||
import Box from '@material-ui/core/Box'; | ||
|
||
export default function BoxClone() { | ||
return ( | ||
<Box border="1px dashed grey" clone> | ||
<Button>Save</Button> | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import * as React from 'react'; | ||
import Box from '@material-ui/core/Box'; | ||
import Button from '@material-ui/core/Button'; | ||
|
||
export default function BoxComponent() { | ||
return ( | ||
<Box component="span" p={2} border="1px dashed grey"> | ||
<Button>Save</Button> | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import * as React from 'react'; | ||
import Box from '@material-ui/core/Box'; | ||
import Button from '@material-ui/core/Button'; | ||
|
||
export default function BoxComponent() { | ||
return ( | ||
<Box component="span" p={2} border="1px dashed grey"> | ||
<Button>Save</Button> | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import * as React from 'react'; | ||
import Button from '@material-ui/core/Button'; | ||
import Box from '@material-ui/core/Box'; | ||
|
||
export default function BoxClone() { | ||
return ( | ||
<Box border="1px dashed grey"> | ||
{(props) => <Button {...props}>Save</Button>} | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import * as React from 'react'; | ||
import Button from '@material-ui/core/Button'; | ||
import Box from '@material-ui/core/Box'; | ||
|
||
export default function BoxClone() { | ||
return ( | ||
<Box border="1px dashed grey"> | ||
{(props: { className: string }) => <Button {...props}>Save</Button>} | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import * as React from 'react'; | ||
import Box from '@material-ui/core/Box'; | ||
|
||
export default function BoxSx() { | ||
return ( | ||
<Box | ||
sx={{ | ||
width: 300, | ||
height: 300, | ||
bgcolor: 'primary.dark', | ||
':hover': { | ||
backgroundColor: 'primary.main', | ||
opacity: [0.9, 0.8, 0.7], | ||
}, | ||
}} | ||
/> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import * as React from 'react'; | ||
import Box from '@material-ui/core/Box'; | ||
|
||
export default function BoxSx() { | ||
return ( | ||
<Box | ||
sx={{ | ||
width: 300, | ||
height: 300, | ||
bgcolor: 'primary.dark', | ||
':hover': { | ||
backgroundColor: 'primary.main', | ||
opacity: [0.9, 0.8, 0.7], | ||
}, | ||
}} | ||
/> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
export { default } from './Box'; | ||
export * from './Box'; | ||
export { default as styleFunction } from './styleFunction'; | ||
export * from './styleFunction'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { default, styleFunction } from './Box'; | ||
export { default } from './Box'; | ||
export { default as styleFunction } from './styleFunction'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { BoxStyleFunction } from './Box'; | ||
|
||
declare const styleFunction: BoxStyleFunction; | ||
export default styleFunction; |
Oops, something went wrong.