Skip to content

Commit 9210c80

Browse files
Merge branch 'master' into docs-vale
2 parents a187dd4 + 591952b commit 9210c80

File tree

18 files changed

+191
-32
lines changed

18 files changed

+191
-32
lines changed

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ pnpm install
110110

111111
1. Replace `<your-local-toolpad-monorepo>` with the path to the toolpad monorepo on your file system. Make sure to keep `portal:`.
112112

113-
1. In order to use `portal:` dependencies, we will need to use pnpm 2. So start by running
113+
1. In order to use `portal:` dependencies, we will need to use yarn 2. So start by running
114114

115115
```bash
116-
pnpm set version berry
116+
yarn set version berry
117117
```
118118

119-
and add to the `.pnpmrc.yml`:
119+
and add to the `.yarnrc.yml`:
120120

121121
```yaml
122122
nodeLinker: node-modules
@@ -125,13 +125,13 @@ pnpm install
125125
1. then run
126126

127127
```bash
128-
pnpm install
128+
yarn install
129129
```
130130

131131
1. Run start toolpad in dev mode:
132132

133133
```bash
134-
pnpm dev
134+
yarn dev
135135
```
136136

137137
</details>

docs/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('@mui/monorepo/docs/config');

docs/data/toolpad/reference/components/list.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ A list component.
88

99
## Properties
1010

11-
| Name | Type | Default | Description |
12-
| :-------------------------------------------- | :-------------------------------------- | :---------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
13-
| <span class="prop-name">itemCount</span> | <span class="prop-type">number</span> | <span class="prop-default">3</span> | Number of items to render. |
14-
| <span class="prop-name">renderItem</span> | <span class="prop-type">template</span> | | List item template to render. |
15-
| <span class="prop-name">disablePadding</span> | <span class="prop-type">boolean</span> | | If true, vertical padding is removed from the list. |
16-
| <span class="prop-name">sx</span> | <span class="prop-type">object</span> | | The [`sx` prop](https://mui.com/system/getting-started/the-sx-prop/) is used for defining custom styles that have access to the theme. All MUI System properties are available via the `sx` prop. In addition, the `sx` prop allows you to specify any other CSS rules you may need. |
11+
| Name | Type | Default | Description |
12+
| :-------------------------------------------- | :-------------------------------------- | :-------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
13+
| <span class="prop-name">itemCount</span> | <span class="prop-type">number</span> | <span class="prop-default">3</span> | Number of items to render. |
14+
| <span class="prop-name">renderItem</span> | <span class="prop-type">template</span> | | List item template to render. |
15+
| <span class="prop-name">disablePadding</span> | <span class="prop-type">boolean</span> | | If true, vertical padding is removed from the list. |
16+
| <span class="prop-name">loading</span> | <span class="prop-type">boolean</span> | <span class="prop-default">false</span> | Displays a loading animation indicating the list is still loading |
17+
| <span class="prop-name">sx</span> | <span class="prop-type">object</span> | | The [`sx` prop](https://mui.com/system/getting-started/the-sx-prop/) is used for defining custom styles that have access to the theme. All MUI System properties are available via the `sx` prop. In addition, the `sx` prop allows you to specify any other CSS rules you may need. |

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@mui/lab": "5.0.0-alpha.165",
3131
"@mui/material": "5.15.10",
3232
"@mui/material-nextjs": "^5.15.9",
33-
"@mui/monorepo": "github:mui/material-ui#c434322eccab4d5cea72535d5e46e1e9e76a69a8",
33+
"@mui/monorepo": "github:mui/material-ui#36bb1aa7f35b4b9d527716a5907e9be38d78ffd7",
3434
"@mui/styles": "5.15.10",
3535
"@mui/toolpad": "workspace:*",
3636
"@mui/utils": "5.15.9",

docs/pages/_app.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ import GoogleAnalytics from 'docs/src/modules/components/GoogleAnalytics';
1111
import { ThemeProvider } from 'docs/src/modules/components/ThemeContext';
1212
import { CodeVariantProvider } from 'docs/src/modules/utils/codeVariant';
1313
import { CodeCopyProvider } from 'docs/src/modules/utils/CodeCopy';
14-
import { UserLanguageProvider } from 'docs/src/modules/utils/i18n';
1514
import DocsStyledEngineProvider from 'docs/src/modules/utils/StyledEngineProvider';
1615
import { pathnameToLanguage } from 'docs/src/modules/utils/helpers';
1716
import createEmotionCache from 'docs/src/createEmotionCache';
1817
import findActivePage from 'docs/src/modules/utils/findActivePage';
1918
import getProductInfoFromUrl from 'docs/src/modules/utils/getProductInfoFromUrl';
2019
import toolpadPkgJson from '@mui/toolpad/package.json';
20+
import { DocsProvider } from '@mui/docs/DocsProvider';
2121
import pages from '../data/pages';
22+
import config from '../config';
2223

2324
const clientSideEmotionCache = createEmotionCache();
2425

@@ -174,7 +175,7 @@ function AppWrapper(props) {
174175
<meta name="mui:productId" content={productId} />
175176
<meta name="mui:productCategoryId" content={productCategoryId} />
176177
</NextHead>
177-
<UserLanguageProvider defaultUserLanguage={pageProps.userLanguage}>
178+
<DocsProvider config={config} defaultUserLanguage={pageProps.userLanguage}>
178179
<CodeCopyProvider>
179180
<CodeVariantProvider>
180181
<PageContext.Provider value={pageContextValue}>
@@ -187,7 +188,7 @@ function AppWrapper(props) {
187188
</PageContext.Provider>
188189
</CodeVariantProvider>
189190
</CodeCopyProvider>
190-
</UserLanguageProvider>
191+
</DocsProvider>
191192
</React.Fragment>
192193
);
193194
}

docs/src/components/landing/Banner.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from 'react';
22
import PropTypes from 'prop-types';
33
import Stack from '@mui/material/Stack';
44
import Button from '@mui/material/Button';
5-
import Link from 'docs/src/modules/components/Link';
5+
import { Link } from '@mui/docs/Link';
66
import Typography from '@mui/material/Typography';
77
import KeyboardArrowRightRounded from '@mui/icons-material/KeyboardArrowRightRounded';
88
import { alpha } from '@mui/material/styles';

docs/src/components/landing/GetStartedButtons.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
33
import Box from '@mui/material/Box';
44
import Button from '@mui/material/Button';
55
import KeyboardArrowRightRounded from '@mui/icons-material/KeyboardArrowRightRounded';
6-
import Link from 'docs/src/modules/components/Link';
6+
import { Link } from '@mui/docs/Link';
77
import NpmCopyButton from 'docs/src/components/action/NpmCopyButton';
88

99
export default function GetStartedButtons(props) {

docs/src/components/landing/UseCases.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react';
2-
import Link from 'docs/src/modules/components/Link';
2+
import { Link } from '@mui/docs/Link';
33
import PropTypes from 'prop-types';
44
import { styled, alpha } from '@mui/material/styles';
55
import Box from '@mui/material/Box';

eslintWebpackResolverConfig.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module.exports = {
55
resolve: {
66
modules: [__dirname, 'node_modules'],
77
alias: {
8+
'@mui/docs': path.resolve(__dirname, './node_modules/@mui/monorepo/packages/mui-docs/src'),
89
'@mui/toolpad-components': path.resolve(__dirname, './packages/toolpad-components/src'),
910
'@mui/toolpad-core': path.resolve(__dirname, './packages/toolpad-core/src'),
1011
'@mui/toolpad-utils': path.resolve(__dirname, './packages/toolpad-utils/src'),
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Hacker News client
2+
3+
<p class="description">Toolpad application that demonstrates writing an alternative (simplified) [Hacker News](https://news.ycombinator.com/news) client.</p>
4+
5+
## How to run
6+
7+
Use `create-toolpad-app` to bootstrap the example:
8+
9+
```bash
10+
npx create-toolpad-app@latest --example hacker-news-client
11+
```
12+
13+
```bash
14+
yarn create toolpad-app --example hacker-news-client
15+
```
16+
17+
```bash
18+
pnpm create toolpad-app --example hacker-news-client
19+
```
20+
21+
or:
22+
23+
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/fork/github/mui/mui-toolpad/tree/master/examples/hacker-news-client)
24+
25+
## What's inside
26+
27+
A Toolpad app that shows how to:
28+
29+
- chain REST API calls
30+
- use the List component
31+
32+
## The source
33+
34+
[Check out the source code](https://github.com/mui/mui-toolpad/tree/master/examples/hacker-news-client)

0 commit comments

Comments
 (0)