Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: danilo leal <67129314+danilo-leal@users.noreply.github.com> Co-authored-by: Siriwat K <siriwatkunaporn@gmail.com>
- Loading branch information
1 parent
55701bf
commit e039a59
Showing
13 changed files
with
112 additions
and
82 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import * as React from 'react'; | ||
import JoyUsageDemo from 'docs/src/modules/components/JoyUsageDemo'; | ||
import Sheet from '@mui/joy/Sheet'; | ||
|
||
export default function SheetUsage() { | ||
return ( | ||
<JoyUsageDemo | ||
componentName="Sheet" | ||
data={[ | ||
{ | ||
propName: 'variant', | ||
knob: 'select', | ||
defaultValue: 'plain', | ||
options: ['plain', 'outlined', 'soft', 'solid'], | ||
}, | ||
{ | ||
propName: 'color', | ||
knob: 'color', | ||
defaultValue: 'neutral', | ||
options: ['neutral', 'primary', 'danger', 'info', 'success', 'warning'], | ||
}, | ||
]} | ||
renderDemo={(props) => ( | ||
<Sheet | ||
{...props} | ||
sx={{ | ||
width: 250, | ||
height: 200, | ||
m: 1, | ||
display: 'flex', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
}} | ||
> | ||
Sheet | ||
</Sheet> | ||
)} | ||
/> | ||
); | ||
} |
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,10 @@ | ||
import Sheet from '@mui/joy/Sheet'; | ||
import * as React from 'react'; | ||
|
||
export default function SimpleSheet() { | ||
return ( | ||
<Sheet variant="outlined" color="neutral" sx={{ p: 4 }}> | ||
Hello world! | ||
</Sheet> | ||
); | ||
} |
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,10 @@ | ||
import Sheet from '@mui/joy/Sheet'; | ||
import * as React from 'react'; | ||
|
||
export default function SimpleSheet() { | ||
return ( | ||
<Sheet variant="outlined" color="neutral" sx={{ p: 4 }}> | ||
Hello world! | ||
</Sheet> | ||
); | ||
} |
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 @@ | ||
<Sheet variant="outlined" color="neutral" sx={{ p: 4 }}> | ||
Hello world! | ||
</Sheet> |
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,35 @@ | ||
--- | ||
product: joy-ui | ||
title: React Sheet component | ||
--- | ||
|
||
# Sheet | ||
|
||
<p class="description">Sheet is a useful surface component that implements the global variant feature.</p> | ||
|
||
## Introduction | ||
|
||
The `Sheet` container is a generic container. | ||
It's a sibling to the `Box` component with the difference being that it supports Joy UI's global variants out of the box. | ||
|
||
{{"demo": "SheetUsage.js", "hideToolbar": true, "bg": true}} | ||
|
||
{{"component": "modules/components/ComponentLinkHeader.js"}} | ||
|
||
## Component | ||
|
||
After [installation](/joy-ui/getting-started/installation/), you can start building with this component using the following basic elements: | ||
|
||
```jsx | ||
import Sheet from '@mui/joy/Sheet'; | ||
|
||
export default function MyApp() { | ||
return <Sheet>Holy sheet!</Sheet>; | ||
} | ||
``` | ||
|
||
### Basic usage | ||
|
||
The `Sheet` component, in addition to the variants, also has access to the `color` prop, allowing you to use every palette of the theme. | ||
|
||
{{"demo": "SimpleSheet.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
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,7 @@ | ||
import * as React from 'react'; | ||
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; | ||
import { demos, docs, demoComponents } from 'docs/data/joy/components/sheet/sheet.md?@mui/markdown'; | ||
|
||
export default function Page() { | ||
return <MarkdownDocs demos={demos} docs={docs} demoComponents={demoComponents} />; | ||
} |
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