forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Box] Support generateClassName and defaultClassName (mui#29347)
- Loading branch information
1 parent
b399a0a
commit 069fabb
Showing
5 changed files
with
58 additions
and
4 deletions.
There are no files selected for viewing
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,11 +1,16 @@ | ||
import { createBox } from '@mui/system'; | ||
import { unstable_ClassNameGenerator as ClassNameGenerator } from '../utils'; | ||
import { createTheme } from '../styles'; | ||
|
||
const defaultTheme = createTheme(); | ||
|
||
/** | ||
* @ignore - do not document. | ||
*/ | ||
const Box = createBox({ defaultTheme }); | ||
const Box = createBox({ | ||
defaultTheme, | ||
defaultClassName: 'MuiBox-root', | ||
generateClassName: ClassNameGenerator.generate, | ||
}); | ||
|
||
export default 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
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,3 +1,7 @@ | ||
import * as React from 'react'; | ||
|
||
export default function createBox(options?: { defaultTheme: object }): React.ElementType; | ||
export default function createBox(options?: { | ||
defaultTheme: object; | ||
defaultClassName?: string; | ||
generateClassName?: () => string; | ||
}): React.ElementType; |
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