Skip to content

Commit

Permalink
Docs-update (#1829)
Browse files Browse the repository at this point in the history
Co-authored-by: Pedro Ferreira <10789765+apedroferreira@users.noreply.github.com>
  • Loading branch information
prakhargupta1 and apedroferreira authored Apr 10, 2023
1 parent 40bca83 commit 61ddb78
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/data/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ const pages: MuiPage[] = [
pathname: '/toolpad/data-binding',
icon: 'CodeIcon',
},
{
pathname: '/toolpad/deployment',
icon: 'BuildIcon',
},
// {
// pathname: '/toolpad/versioning-and-deploying',
// title: 'Versioning & deploying [TODO]',
Expand Down
12 changes: 12 additions & 0 deletions docs/data/toolpad/data-binding.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,15 @@ Empty field:
Field with value:

<img src="/static/toolpad/docs/data-binding/bind-6.png" alt="Binding result 2" width="902px" />

## Event handling

Some components have event handler props, such as the `Button` component and its `onClick` prop. Event handler props can be bound to run a piece of code to mutate the page state.

(In the example below you can see how after clicking the button, the value is copied from one component to the other)

<img src="/static/toolpad/docs/data-binding/bind-10.png" alt="Binding result 2" width="902px" style="margin-bottom: 8px;" />

After clicking the Button:

<img src="/static/toolpad/docs/data-binding/bind-11.png" alt="Binding result 2" width="200px" />
26 changes: 26 additions & 0 deletions docs/data/toolpad/deployment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Deployment

<p class="description">Deploying a Toolpad app is like deploying any other React application and has 3 steps:</p>

To serve your app locally:

```sh
npm start
```

This command will create an optimized production build for the Toolpad app and will output the generated files:

```sh
npm run build
```

Once the build has been made, you can deploy it to any service of your choice!

## Overriding page display mode

You can override any page's display mode by adding the `toolpad-display` query parameter to the URL.

Possible values:

- `standalone` - Hide app shell
- `shell` - Show navigation sidebar
7 changes: 7 additions & 0 deletions docs/pages/toolpad/deployment.js
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 '../../data/toolpad/deployment.md?@mui/markdown';

export default function Page() {
return <MarkdownDocs demos={demos} docs={docs} demoComponents={demoComponents} disableAd />;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 61ddb78

Please sign in to comment.