-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Pickers] Enable YearPicker documentation (#24830)
- Loading branch information
1 parent
09698dc
commit 3cd6f30
Showing
12 changed files
with
109 additions
and
3 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 |
---|---|---|
@@ -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 './year-picker.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/year-picker', | ||
false, | ||
/year-picker.*.json$/, | ||
); | ||
const descriptions = mapApiPageTranslations(req); | ||
|
||
return { | ||
descriptions, | ||
pageContent: jsonPageContent, | ||
}; | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"props": { | ||
"onYearChange": { "type": { "name": "func" } }, | ||
"shouldDisableYear": { "type": { "name": "func" } } | ||
}, | ||
"name": "YearPicker", | ||
"styles": { "classes": ["root"], "globalClasses": {}, "name": "MuiYearPicker" }, | ||
"spread": false, | ||
"forwardsRefTo": "HTMLDivElement", | ||
"filename": "/packages/material-ui-lab/src/YearPicker/YearPicker.tsx", | ||
"inheritance": null, | ||
"demos": "", | ||
"styledComponent": false, | ||
"cssComponent": false | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"componentDescription": "", | ||
"propDescriptions": { | ||
"onYearChange": "Callback firing on year change @DateIOType.", | ||
"shouldDisableYear": "Disable specific years dynamically. Works like <code>shouldDisableDate</code> but for year selection view. @DateIOType." | ||
}, | ||
"classDescriptions": {} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"componentDescription": "", | ||
"propDescriptions": { | ||
"onYearChange": "Callback firing on year change @DateIOType.", | ||
"shouldDisableYear": "Disable specific years dynamically. Works like <code>shouldDisableDate</code> but for year selection view. @DateIOType." | ||
}, | ||
"classDescriptions": {} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"componentDescription": "", | ||
"propDescriptions": { | ||
"onYearChange": "Callback firing on year change @DateIOType.", | ||
"shouldDisableYear": "Disable specific years dynamically. Works like <code>shouldDisableDate</code> but for year selection view. @DateIOType." | ||
}, | ||
"classDescriptions": {} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"componentDescription": "", | ||
"propDescriptions": { | ||
"onYearChange": "Callback firing on year change @DateIOType.", | ||
"shouldDisableYear": "Disable specific years dynamically. Works like <code>shouldDisableDate</code> but for year selection view. @DateIOType." | ||
}, | ||
"classDescriptions": {} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"componentDescription": "", | ||
"propDescriptions": { | ||
"onYearChange": "Callback firing on year change @DateIOType.", | ||
"shouldDisableYear": "Disable specific years dynamically. Works like <code>shouldDisableDate</code> but for year selection view. @DateIOType." | ||
}, | ||
"classDescriptions": {} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"componentDescription": "", | ||
"propDescriptions": { | ||
"onYearChange": "Callback firing on year change @DateIOType.", | ||
"shouldDisableYear": "Disable specific years dynamically. Works like <code>shouldDisableDate</code> but for year selection view. @DateIOType." | ||
}, | ||
"classDescriptions": {} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"componentDescription": "", | ||
"propDescriptions": { | ||
"onYearChange": "Callback firing on year change @DateIOType.", | ||
"shouldDisableYear": "Disable specific years dynamically. Works like <code>shouldDisableDate</code> but for year selection view. @DateIOType." | ||
}, | ||
"classDescriptions": {} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"componentDescription": "", | ||
"propDescriptions": { | ||
"onYearChange": "Callback firing on year change @DateIOType.", | ||
"shouldDisableYear": "Disable specific years dynamically. Works like <code>shouldDisableDate</code> but for year selection view. @DateIOType." | ||
}, | ||
"classDescriptions": {} | ||
} |
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