-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
27471b4
commit 482e5f8
Showing
1 changed file
with
7 additions
and
13 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 |
---|---|---|
@@ -1,20 +1,14 @@ | ||
import React from 'react'; | ||
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; | ||
import Markdown from 'docs/src/pages/components/material-icons/material-icons.md'; | ||
import SearchIcons from 'docs/src/pages/components/material-icons/SearchIcons'; | ||
|
||
const req = (name) => { | ||
const map = { | ||
'material-icons.md': Markdown, | ||
'SearchIcons.js': { | ||
default: SearchIcons, | ||
}, | ||
}; | ||
return map[name]; | ||
}; | ||
req.keys = () => ['material-icons.md', 'SearchIcons.js']; | ||
const req = require.context('docs/src/pages/components/material-icons', false, /\.(md|js|tsx)$/); | ||
const reqSource = require.context( | ||
'!raw-loader!../../src/pages/components/material-icons', | ||
false, | ||
/\.(js|tsx)$/, | ||
); | ||
const reqPrefix = 'pages/components/material-icons'; | ||
|
||
export default function Page() { | ||
return <MarkdownDocs disableToc req={req} reqSource={() => {}} reqPrefix={reqPrefix} />; | ||
return <MarkdownDocs req={req} reqSource={reqSource} reqPrefix={reqPrefix} />; | ||
} |