Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs-update #1829

Merged
merged 6 commits into from
Apr 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.