-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[docs] Add live demo with CssVarsProvider (#38792)
Signed-off-by: Olivier Tassinari <[email protected]> Co-authored-by: Danilo Leal <[email protected]>
- Loading branch information
1 parent
5fc9508
commit 1ad6d26
Showing
8 changed files
with
61 additions
and
24 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
18 changes: 18 additions & 0 deletions
18
docs/data/material/experimental-api/css-theme-variables/usage/CssVarsBasic.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,18 @@ | ||
import * as React from 'react'; | ||
import { | ||
experimental_extendTheme as extendTheme, | ||
Experimental_CssVarsProvider as CssVarsProvider, | ||
} from '@mui/material/styles'; | ||
import Button from '@mui/material/Button'; | ||
|
||
const theme = extendTheme({ | ||
cssVarPrefix: 'md-demo', | ||
}); | ||
|
||
export default function CssVarsBasic() { | ||
return ( | ||
<CssVarsProvider theme={theme}> | ||
<Button variant="contained">Hello world</Button> | ||
</CssVarsProvider> | ||
); | ||
} |
18 changes: 18 additions & 0 deletions
18
docs/data/material/experimental-api/css-theme-variables/usage/CssVarsBasic.tsx
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 { | ||
experimental_extendTheme as extendTheme, | ||
Experimental_CssVarsProvider as CssVarsProvider, | ||
} from '@mui/material/styles'; | ||
import Button from '@mui/material/Button'; | ||
|
||
const theme = extendTheme({ | ||
cssVarPrefix: 'md-demo', | ||
}); | ||
|
||
export default function CssVarsBasic() { | ||
return ( | ||
<CssVarsProvider theme={theme}> | ||
<Button variant="contained">Hello world</Button> | ||
</CssVarsProvider> | ||
); | ||
} |
3 changes: 3 additions & 0 deletions
3
docs/data/material/experimental-api/css-theme-variables/usage/CssVarsBasic.tsx.preview
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,3 @@ | ||
<CssVarsProvider theme={theme}> | ||
<Button variant="contained">Hello world</Button> | ||
</CssVarsProvider> |
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