Skip to content

Commit

Permalink
docs:api
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldudak committed Feb 10, 2022
1 parent 1bc7c72 commit c6659e4
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/data/base/components/menu/menu.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
product: base
title: React Menu unstyled component and hook
components: MenuUnstyled, MenuItemUnstyled
components: ''
githubLabel: 'component: menu'
waiAria: https://www.w3.org/TR/wai-aria-practices/#menu
---
Expand Down
2 changes: 2 additions & 0 deletions docs/data/base/pagesApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ module.exports = [
{ pathname: '/base/api/click-away-listener' },
{ pathname: '/base/api/form-control-unstyled' },
{ pathname: '/base/api/input-unstyled' },
{ pathname: '/base/api/menu-item-unstyled' },
{ pathname: '/base/api/menu-unstyled' },
{ pathname: '/base/api/modal-unstyled' },
{ pathname: '/base/api/multi-select-unstyled' },
{ pathname: '/base/api/no-ssr' },
Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/components/menus/menus.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
product: material
title: React Menu component
components: Menu, MenuItem, MenuList, ClickAwayListener, Popover, Popper
components: Menu, MenuItem, MenuList, ClickAwayListener, Popover, Popper, MenuUnstyled, MenuItemUnstyled
githubLabel: 'component: menu'
materialDesign: https://material.io/components/menus
waiAria: https://www.w3.org/TR/wai-aria-practices/#menubutton
Expand Down
23 changes: 23 additions & 0 deletions docs/pages/base/api/menu-item-unstyled.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import * as React from 'react';
import ApiPage from 'docs/src/modules/components/ApiPage';
import mapApiPageTranslations from 'docs/src/modules/utils/mapApiPageTranslations';
import jsonPageContent from './menu-item-unstyled.json';

export default function Page(props) {
const { descriptions, pageContent } = props;
return <ApiPage descriptions={descriptions} pageContent={pageContent} />;
}

Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs/menu-item-unstyled',
false,
/menu-item-unstyled.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

return {
descriptions,
pageContent: jsonPageContent,
};
};
11 changes: 11 additions & 0 deletions docs/pages/base/api/menu-item-unstyled.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"props": { "disabled": { "type": { "name": "bool" } } },
"name": "MenuItemUnstyled",
"styles": { "classes": [], "globalClasses": {}, "name": null },
"spread": true,
"forwardsRefTo": "HTMLLIElement",
"filename": "/packages/mui-base/src/MenuItemUnstyled/MenuItemUnstyled.tsx",
"inheritance": null,
"demos": "<ul><li><a href=\"/material/react-menu/\">Menus</a></li></ul>",
"cssComponent": false
}
23 changes: 23 additions & 0 deletions docs/pages/base/api/menu-unstyled.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import * as React from 'react';
import ApiPage from 'docs/src/modules/components/ApiPage';
import mapApiPageTranslations from 'docs/src/modules/utils/mapApiPageTranslations';
import jsonPageContent from './menu-unstyled.json';

export default function Page(props) {
const { descriptions, pageContent } = props;
return <ApiPage descriptions={descriptions} pageContent={pageContent} />;
}

Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs/menu-unstyled',
false,
/menu-unstyled.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

return {
descriptions,
pageContent: jsonPageContent,
};
};
11 changes: 11 additions & 0 deletions docs/pages/base/api/menu-unstyled.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"props": {},
"name": "MenuUnstyled",
"styles": { "classes": [], "globalClasses": {}, "name": null },
"spread": true,
"forwardsRefTo": "HTMLUListElement",
"filename": "/packages/mui-base/src/MenuUnstyled/MenuUnstyled.tsx",
"inheritance": null,
"demos": "<ul><li><a href=\"/material/react-menu/\">Menus</a></li></ul>",
"cssComponent": false
}

0 comments on commit c6659e4

Please sign in to comment.