chore: introduce TS path aliases for improved DX in v8 (#25778)
* chore: add v8 base tsconfig with relevant path aliases * chore: use v8 path aliases for v8 related apps/* * chore(react-18-tests-v8): follow same pattern with type-check as in v9 when using path aliases * chore(merge-styles): resolve leaking global type issues exposed by using ts path aliases * generate changefiles * fix(theming-designer): fix ts errors exposed by common settings in base.v8 * chore(public-docsite): enable strictNullChecks and noImplicit any to align with v9 packages and to leverage path aliases * feat(scripts): add v8 package compilation if TS path aliases are used
This commit is contained in:
Родитель
50acef3202
Коммит
5079ab5294
|
@ -1,21 +1,15 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"extends": "../../tsconfig.base.v8.json",
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"outDir": "lib",
|
||||
"module": "commonjs",
|
||||
"jsx": "react",
|
||||
"declaration": true,
|
||||
"sourceMap": true,
|
||||
"experimentalDecorators": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"moduleResolution": "node",
|
||||
"preserveConstEnums": true,
|
||||
"strictNullChecks": true,
|
||||
"noImplicitAny": true,
|
||||
"lib": ["es6", "dom"],
|
||||
"types": ["webpack-env"],
|
||||
"skipLibCheck": true
|
||||
"lib": ["ES2015", "DOM"],
|
||||
"types": ["webpack-env", "node"]
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.v8.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"outDir": "lib",
|
||||
|
@ -6,19 +7,11 @@
|
|||
"module": "commonjs",
|
||||
"jsx": "react",
|
||||
"declaration": true,
|
||||
"sourceMap": true,
|
||||
"experimentalDecorators": true,
|
||||
"importHelpers": true,
|
||||
"noUnusedLocals": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strictNullChecks": true,
|
||||
"noImplicitAny": true,
|
||||
"moduleResolution": "node",
|
||||
"preserveConstEnums": true,
|
||||
"noImplicitThis": true,
|
||||
"skipLibCheck": true,
|
||||
"lib": ["es5", "dom", "es2015.promise"],
|
||||
"typeRoots": ["../../node_modules/@types", "../../typings"],
|
||||
"types": ["webpack-env", "custom-global"]
|
||||
},
|
||||
"include": ["src"]
|
||||
|
|
|
@ -12,7 +12,7 @@ export interface ICategory {
|
|||
// Exporting this object to be used in generating a TOC (table of content) for docs.microsoft documentation repo.
|
||||
// Any changes to this object need to be communicated to avoid accidental breaking of the documentation
|
||||
// and to allow the appropriate actions to be taken to mitigate this.
|
||||
export const categories: { Other?: ICategory; [name: string]: ICategory } = {
|
||||
export const categories: { [name: string]: ICategory } = {
|
||||
'Basic Inputs': {
|
||||
Button: {},
|
||||
Checkbox: {},
|
||||
|
|
|
@ -161,7 +161,7 @@ export class IconGrid extends React.Component<IIconGridProps, IIconGridState> {
|
|||
|
||||
private _onSearchQueryChanged: ISearchBoxProps['onChange'] = (ev, newValue) => {
|
||||
this.setState({
|
||||
searchQuery: newValue,
|
||||
searchQuery: newValue!,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
@ -155,11 +155,11 @@ export class Nav extends React.Component<INavProps, INavState> {
|
|||
<li
|
||||
className={css(
|
||||
styles.link,
|
||||
isPageActive(page.url) && styles.isActive,
|
||||
isPageActive(page.url!) && styles.isActive,
|
||||
hasActiveChild(page) && styles.hasActiveChild,
|
||||
page.isHomePage && styles.isHomePage,
|
||||
)}
|
||||
key={linkIndex + page.url}
|
||||
key={linkIndex + page.url!}
|
||||
>
|
||||
{page.title.toLowerCase().indexOf(searchQuery) !== -1 && (
|
||||
<Link href={page.url} onClick={this._onLinkClick} target={page.isExternal ? '_blank' : undefined}>
|
||||
|
|
|
@ -96,7 +96,7 @@ export class Site<TPlatforms extends string = string> extends React.Component<
|
|||
let platform = 'default' as TPlatforms;
|
||||
|
||||
// If current page doesn't have pages for the active platform, switch to its first platform.
|
||||
if (Object.keys(navData.pagePlatforms).length > 0 && navData.activePages.length === 0) {
|
||||
if (Object.keys(navData.pagePlatforms!).length > 0 && navData.activePages!.length === 0) {
|
||||
const firstPlatform = getPageFirstPlatform(getSiteArea(siteDefinition.pages), siteDefinition);
|
||||
const currentPage = getSiteArea(siteDefinition.pages);
|
||||
platform = firstPlatform;
|
||||
|
@ -142,7 +142,7 @@ export class Site<TPlatforms extends string = string> extends React.Component<
|
|||
const { siteDefinition } = this.props;
|
||||
|
||||
// If current page doesn't have pages for the active platform, switch to its first platform.
|
||||
if (Object.keys(pagePlatforms).length > 0 && activePages.length === 0) {
|
||||
if (Object.keys(pagePlatforms!).length > 0 && activePages!.length === 0) {
|
||||
const firstPlatform = getPageFirstPlatform(getSiteArea(siteDefinition.pages), siteDefinition);
|
||||
this._onPlatformChanged(firstPlatform);
|
||||
}
|
||||
|
@ -347,22 +347,19 @@ export class Site<TPlatforms extends string = string> extends React.Component<
|
|||
return null;
|
||||
};
|
||||
|
||||
private _renderPlatformBar = (): JSX.Element | undefined => {
|
||||
private _renderPlatformBar = (): JSX.Element | null => {
|
||||
const { siteDefinition } = this.props;
|
||||
const { platform, pagePlatforms, hasPlatformPicker } = this.state;
|
||||
|
||||
return (
|
||||
hasPlatformPicker &&
|
||||
Object.keys(pagePlatforms).length > 0 && (
|
||||
<PlatformBar
|
||||
activePlatform={platform}
|
||||
onPlatformClick={this._onPlatformChanged}
|
||||
pagePlatforms={pagePlatforms}
|
||||
platforms={siteDefinition.platforms}
|
||||
innerWidth={appMaximumWidthLg}
|
||||
/>
|
||||
)
|
||||
);
|
||||
return hasPlatformPicker && Object.keys(pagePlatforms!).length > 0 ? (
|
||||
<PlatformBar
|
||||
activePlatform={platform}
|
||||
onPlatformClick={this._onPlatformChanged}
|
||||
pagePlatforms={pagePlatforms}
|
||||
platforms={siteDefinition.platforms!}
|
||||
innerWidth={appMaximumWidthLg}
|
||||
/>
|
||||
) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -500,7 +497,7 @@ export class Site<TPlatforms extends string = string> extends React.Component<
|
|||
document.title = [
|
||||
siteDefinition.siteTitle,
|
||||
siteArea,
|
||||
currPlatform && platforms[currPlatform]?.name,
|
||||
currPlatform && platforms![currPlatform]?.name,
|
||||
activePageName !== siteArea && activePageName,
|
||||
]
|
||||
.filter(Boolean)
|
||||
|
@ -531,7 +528,7 @@ export class Site<TPlatforms extends string = string> extends React.Component<
|
|||
this._jumpInterval = this._async.setInterval(() => {
|
||||
const el = document.getElementById(anchor);
|
||||
if (el || Date.now() - start > 1000) {
|
||||
this._async.clearInterval(this._jumpInterval);
|
||||
this._async.clearInterval(this._jumpInterval!);
|
||||
this._jumpInterval = undefined;
|
||||
if (el) {
|
||||
jumpToAnchor(anchor);
|
||||
|
|
|
@ -59,7 +59,7 @@ export class Table extends React.Component<ITableProps, ITableState> {
|
|||
</td>
|
||||
) : (
|
||||
// eslint-disable-next-line react/no-danger
|
||||
<td className={cell.className} key={index} dangerouslySetInnerHTML={{ __html: cell.html }} />
|
||||
<td className={cell.className} key={index} dangerouslySetInnerHTML={{ __html: cell.html! }} />
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { ActivityItemPageProps } from './ActivityItemPage.doc';
|
||||
|
||||
export const ActivityItemPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...ActivityItemPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...ActivityItemPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { AnnouncedBulkOperationsPageProps } from './AnnouncedBulkOperationsPage.doc';
|
||||
|
||||
export const AnnouncedBulkOperationsPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...AnnouncedBulkOperationsPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...AnnouncedBulkOperationsPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { AnnouncedLazyLoadingPageProps } from './AnnouncedLazyLoadingPage.doc';
|
||||
|
||||
export const AnnouncedLazyLoadingPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...AnnouncedLazyLoadingPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...AnnouncedLazyLoadingPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { AnnouncedPageProps } from './AnnouncedPage.doc';
|
||||
|
||||
export const AnnouncedPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...AnnouncedPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...AnnouncedPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { AnnouncedQuickActionsPageProps } from './AnnouncedQuickActionsPage.doc';
|
||||
|
||||
export const AnnouncedQuickActionsPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...AnnouncedQuickActionsPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...AnnouncedQuickActionsPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { AnnouncedSearchResultsPageProps } from './AnnouncedSearchResultsPage.doc';
|
||||
|
||||
export const AnnouncedSearchResultsPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...AnnouncedSearchResultsPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...AnnouncedSearchResultsPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -12,13 +12,13 @@ export const AvatarPage: React.FunctionComponent<IControlsPageProps> = props =>
|
|||
<ControlsAreaPage
|
||||
{...props}
|
||||
title="Avatar"
|
||||
{...AvatarPageProps[platform]}
|
||||
otherSections={_otherSections(platform) as IPageSectionProps[]}
|
||||
{...AvatarPageProps[platform!]}
|
||||
otherSections={_otherSections(platform!) as IPageSectionProps[]}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] {
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] | undefined {
|
||||
switch (platform) {
|
||||
case 'ios':
|
||||
return [
|
||||
|
|
|
@ -11,7 +11,7 @@ export const BottomNavigationPage: React.FunctionComponent<IControlsPageProps> =
|
|||
return (
|
||||
<ControlsAreaPage
|
||||
{...props}
|
||||
{...BottomNavigationPageProps[props.platform]}
|
||||
{...BottomNavigationPageProps[props.platform!]}
|
||||
otherSections={_otherSections(props.platform) as IPageSectionProps[]}
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -13,13 +13,13 @@ export const BottomSheetPage: React.FunctionComponent<IControlsPageProps> = prop
|
|||
<ControlsAreaPage
|
||||
{...props}
|
||||
title="BottomSheet"
|
||||
{...BottomSheetPageProps[platform]}
|
||||
otherSections={_otherSections(platform) as IPageSectionProps[]}
|
||||
{...BottomSheetPageProps[platform!]}
|
||||
otherSections={_otherSections(platform!) as IPageSectionProps[]}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] {
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] | undefined {
|
||||
switch (platform) {
|
||||
case 'android':
|
||||
return [
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { BreadcrumbPageProps } from './BreadcrumbPage.doc';
|
||||
|
||||
export const BreadcrumbPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...BreadcrumbPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...BreadcrumbPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -58,14 +58,14 @@ export class ButtonPage extends React.Component<
|
|||
<ControlsAreaPage
|
||||
{...this.props}
|
||||
title="Button"
|
||||
{...buttonPageProps[this.props.platform]}
|
||||
{...buttonPageProps[this.props.platform!]}
|
||||
exampleKnobs={this.renderKnobs()}
|
||||
otherSections={this._otherSections(this.props.platform) as IPageSectionProps[]}
|
||||
otherSections={this._otherSections(this.props.platform!) as IPageSectionProps[]}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
private _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] {
|
||||
private _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] | undefined {
|
||||
switch (platform) {
|
||||
case 'ios':
|
||||
return [
|
||||
|
|
|
@ -13,13 +13,13 @@ export const CalendarPage: React.FunctionComponent<IControlsPageProps> = props =
|
|||
<ControlsAreaPage
|
||||
{...props}
|
||||
title="Calendar"
|
||||
{...CalendarPageProps[props.platform]}
|
||||
otherSections={_otherSections(platform) as IPageSectionProps[]}
|
||||
{...CalendarPageProps[props.platform!]}
|
||||
otherSections={_otherSections(platform!) as IPageSectionProps[]}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] {
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] | undefined {
|
||||
switch (platform) {
|
||||
case 'android':
|
||||
return [
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { CalloutPageProps } from './CalloutPage.doc';
|
||||
|
||||
export const CalloutPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...CalloutPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...CalloutPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { CheckboxPageProps } from './CheckboxPage.doc';
|
||||
|
||||
export const CheckboxPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...CheckboxPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...CheckboxPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -11,13 +11,13 @@ export const ChipPage: React.FunctionComponent<IControlsPageProps> = props => {
|
|||
return (
|
||||
<ControlsAreaPage
|
||||
{...props}
|
||||
{...ChipPageProps[platform]}
|
||||
otherSections={_otherSections(platform) as IPageSectionProps[]}
|
||||
{...ChipPageProps[platform!]}
|
||||
otherSections={_otherSections(platform!) as IPageSectionProps[]}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] {
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] | undefined {
|
||||
switch (platform) {
|
||||
case 'ios':
|
||||
return [
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { ChoiceGroupPageProps } from './ChoiceGroupPage.doc';
|
||||
|
||||
export const ChoiceGroupPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...ChoiceGroupPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...ChoiceGroupPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { CoachmarkPageProps } from './CoachmarkPage.doc';
|
||||
|
||||
export const CoachmarkPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...CoachmarkPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...CoachmarkPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { ColorPickerPageProps } from './ColorPickerPage.doc';
|
||||
|
||||
export const ColorPickerPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...ColorPickerPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...ColorPickerPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { ComboBoxPageProps } from './ComboBoxPage.doc';
|
||||
|
||||
export const ComboBoxPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...ComboBoxPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...ComboBoxPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { CommandBarPageProps } from './CommandBarPage.doc';
|
||||
|
||||
export const CommandBarPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...CommandBarPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...CommandBarPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { ContextualMenuPageProps } from './ContextualMenuPage.doc';
|
||||
|
||||
export const ContextualMenuPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...ContextualMenuPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...ContextualMenuPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -22,8 +22,8 @@ const ControlsAreaPageBase: React.FunctionComponent<IControlsPageProps> = props
|
|||
}
|
||||
return (
|
||||
<Page
|
||||
subTitle={getSubTitle(props.platform)}
|
||||
jsonDocs={jsonDocs}
|
||||
subTitle={getSubTitle(props.platform!)}
|
||||
jsonDocs={jsonDocs!}
|
||||
{...props}
|
||||
versionSwitcherDefinition={
|
||||
props.platform === Platforms.web ? SiteDefinition.versionSwitcherDefinition : undefined
|
||||
|
|
|
@ -12,13 +12,13 @@ export const DatePickerPage: React.FunctionComponent<IControlsPageProps> = props
|
|||
return (
|
||||
<ControlsAreaPage
|
||||
{...props}
|
||||
{...DatePickerPageProps[platform]}
|
||||
otherSections={_otherSections(platform) as IPageSectionProps[]}
|
||||
{...DatePickerPageProps[platform!]}
|
||||
otherSections={_otherSections(platform!) as IPageSectionProps[]}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] {
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] | undefined {
|
||||
switch (platform) {
|
||||
case 'ios':
|
||||
return [
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { DetailsListAdvancedPageProps } from './DetailsListAdvancedPage.doc';
|
||||
|
||||
export const DetailsListAdvancedPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...DetailsListAdvancedPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...DetailsListAdvancedPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { DetailsListAnimationPageProps } from './DetailsListAnimationPage.doc';
|
||||
|
||||
export const DetailsListAnimationPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...DetailsListAnimationPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...DetailsListAnimationPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { DetailsListBasicPageProps } from './DetailsListBasicPage.doc';
|
||||
|
||||
export const DetailsListBasicPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...DetailsListBasicPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...DetailsListBasicPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { DetailsListCompactPageProps } from './DetailsListCompactPage.doc';
|
||||
|
||||
export const DetailsListCompactPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...DetailsListCompactPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...DetailsListCompactPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { DetailsListCustomColumnsPageProps } from './DetailsListCustomColumnsPage.doc';
|
||||
|
||||
export const DetailsListCustomColumnsPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...DetailsListCustomColumnsPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...DetailsListCustomColumnsPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { DetailsListCustomFooterPageProps } from './DetailsListCustomFooterPage.doc';
|
||||
|
||||
export const DetailsListCustomFooterPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...DetailsListCustomFooterPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...DetailsListCustomFooterPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { DetailsListCustomGroupHeadersPageProps } from './DetailsListCustomGroupHeadersPage.doc';
|
||||
|
||||
export const DetailsListCustomGroupHeadersPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...DetailsListCustomGroupHeadersPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...DetailsListCustomGroupHeadersPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { DetailsListCustomRowsPageProps } from './DetailsListCustomRowsPage.doc';
|
||||
|
||||
export const DetailsListCustomRowsPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...DetailsListCustomRowsPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...DetailsListCustomRowsPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -17,7 +17,7 @@ export const DetailsListDragDropPage: React.FunctionComponent<IControlsPageProps
|
|||
});
|
||||
return (
|
||||
<div className={className}>
|
||||
<ControlsAreaPage {...props} {...DetailsListDragDropPageProps[props.platform]} />;
|
||||
<ControlsAreaPage {...props} {...DetailsListDragDropPageProps[props.platform!]} />;
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { DetailsListGroupedPageProps } from './DetailsListGroupedPage.doc';
|
||||
|
||||
export const DetailsListGroupedPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...DetailsListGroupedPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...DetailsListGroupedPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { DetailsListGroupedV2PageProps } from './DetailsListGroupedV2Page.doc';
|
||||
|
||||
export const DetailsListGroupedV2Page: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...DetailsListGroupedV2PageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...DetailsListGroupedV2PageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { DetailsListKeyboardDragDropPageProps } from './DetailsListKeyboardDragDropPage.doc';
|
||||
|
||||
export const DetailsListKeyboardDragDropPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...DetailsListKeyboardDragDropPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...DetailsListKeyboardDragDropPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { DetailsListKeyboardOverridesProps } from './DetailsListKeyboardOverrides.doc';
|
||||
|
||||
export const DetailsListKeyboardOverridesPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...DetailsListKeyboardOverridesProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...DetailsListKeyboardOverridesProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { DetailsListLargeGroupedPageProps } from './DetailsListLargeGroupedPage.doc';
|
||||
|
||||
export const DetailsListLargeGroupedPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...DetailsListLargeGroupedPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...DetailsListLargeGroupedPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { DetailsListLargeGroupedV2PageProps } from './DetailsListLargeGroupedV2Page.doc';
|
||||
|
||||
export const DetailsListLargeGroupedV2Page: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...DetailsListLargeGroupedV2PageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...DetailsListLargeGroupedV2PageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { DetailsListNavigatingFocusPageProps } from './DetailsListNavigatingFocusPage.doc';
|
||||
|
||||
export const DetailsListNavigatingFocusPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...DetailsListNavigatingFocusPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...DetailsListNavigatingFocusPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { DetailsListPageProps } from './DetailsListPage.doc';
|
||||
|
||||
export const DetailsListPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...DetailsListPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...DetailsListPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { DetailsListProportionalColumnsPageProps } from './DetailsListProportionalColumnsPage.doc';
|
||||
|
||||
export const DetailsListProportionalColumnsPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...DetailsListProportionalColumnsPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...DetailsListProportionalColumnsPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { DetailsListShimmerPageProps } from './DetailsListShimmerPage.doc';
|
||||
|
||||
export const DetailsListShimmerPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...DetailsListShimmerPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...DetailsListShimmerPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { DialogPageProps } from './DialogPage.doc';
|
||||
|
||||
export const DialogPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...DialogPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...DialogPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { DocumentCardPageProps } from './DocumentCardPage.doc';
|
||||
|
||||
export const DocumentCardPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...DocumentCardPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...DocumentCardPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -12,13 +12,13 @@ export const DrawerPage: React.FunctionComponent<IControlsPageProps> = props =>
|
|||
<ControlsAreaPage
|
||||
{...props}
|
||||
title="Drawer"
|
||||
{...DrawerPageProps[platform]}
|
||||
otherSections={_otherSections(platform) as IPageSectionProps[]}
|
||||
{...DrawerPageProps[platform!]}
|
||||
otherSections={_otherSections(platform!) as IPageSectionProps[]}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] {
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] | undefined {
|
||||
switch (platform) {
|
||||
case 'ios':
|
||||
return [
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { DropdownPageProps } from './DropdownPage.doc';
|
||||
|
||||
export const DropdownPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...DropdownPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...DropdownPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { FacepilePageProps } from './FacepilePage.doc';
|
||||
|
||||
export const FacepilePage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...FacepilePageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...FacepilePageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { FocusTrapZonePageProps } from './FocusTrapZonePage.doc';
|
||||
|
||||
export const FocusTrapZonePage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...FocusTrapZonePageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...FocusTrapZonePageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { FocusZonePageProps } from './FocusZonePage.doc';
|
||||
|
||||
export const FocusZonePage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...FocusZonePageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...FocusZonePageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { GroupedListPageProps } from './GroupedListPage.doc';
|
||||
|
||||
export const GroupedListPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...GroupedListPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...GroupedListPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { HoverCardPageProps } from './HoverCardPage.doc';
|
||||
|
||||
export const HoverCardPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...HoverCardPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...HoverCardPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { IconPageProps } from './IconPage.doc';
|
||||
|
||||
export const IconPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...IconPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...IconPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { ImagePageProps } from './ImagePage.doc';
|
||||
|
||||
export const ImagePage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...ImagePageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...ImagePageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -6,7 +6,7 @@ import { KeytipLayer } from '@fluentui/react/lib/KeytipLayer';
|
|||
export const KeytipsPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return (
|
||||
<div>
|
||||
<ControlsAreaPage {...props} {...KeytipsPageProps[props.platform]} />
|
||||
<ControlsAreaPage {...props} {...KeytipsPageProps[props.platform!]} />
|
||||
<KeytipLayer content="Alt Windows" />
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { LabelPageProps } from './LabelPage.doc';
|
||||
|
||||
export const LabelPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...LabelPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...LabelPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { LayerPageProps } from './LayerPage.doc';
|
||||
|
||||
export const LayerPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...LayerPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...LayerPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -15,13 +15,13 @@ export const LinkPage: React.FunctionComponent<IControlsPageProps> = props => {
|
|||
return (
|
||||
<ControlsAreaPage
|
||||
{...props}
|
||||
{...LinkPageProps[platform]}
|
||||
otherSections={_otherSections(platform) as IPageSectionProps[]}
|
||||
{...LinkPageProps[platform!]}
|
||||
otherSections={_otherSections(platform!) as IPageSectionProps[]}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] {
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] | undefined {
|
||||
switch (platform) {
|
||||
case 'mac':
|
||||
return [
|
||||
|
|
|
@ -13,13 +13,13 @@ export const ListCellsPage: React.FunctionComponent<IControlsPageProps> = props
|
|||
<ControlsAreaPage
|
||||
{...props}
|
||||
title="List Cells"
|
||||
{...ListCellsPageProps[platform]}
|
||||
otherSections={_otherSections(platform) as IPageSectionProps[]}
|
||||
{...ListCellsPageProps[platform!]}
|
||||
otherSections={_otherSections(platform!) as IPageSectionProps[]}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] {
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] | undefined {
|
||||
switch (platform) {
|
||||
case 'ios':
|
||||
return [
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { ListPageProps } from './ListPage.doc';
|
||||
|
||||
export const ListPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...ListPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...ListPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { MarqueeSelectionPageProps } from './MarqueeSelectionPage.doc';
|
||||
|
||||
export const MarqueeSelectionPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...MarqueeSelectionPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...MarqueeSelectionPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -11,7 +11,7 @@ export const MessageBarPage: React.FunctionComponent<IControlsPageProps> = props
|
|||
return (
|
||||
<ControlsAreaPage
|
||||
{...props}
|
||||
{...MessageBarPageProps[props.platform]}
|
||||
{...MessageBarPageProps[props.platform!]}
|
||||
otherSections={_otherSections(props.platform) as IPageSectionProps[]}
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { ModalPageProps } from './ModalPage.doc';
|
||||
|
||||
export const ModalPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...ModalPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...ModalPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -11,13 +11,13 @@ export const NavBarPage: React.FunctionComponent<IControlsPageProps> = props =>
|
|||
return (
|
||||
<ControlsAreaPage
|
||||
{...props}
|
||||
{...NavBarPageProps[platform]}
|
||||
otherSections={_otherSections(platform) as IPageSectionProps[]}
|
||||
{...NavBarPageProps[platform!]}
|
||||
otherSections={_otherSections(platform!) as IPageSectionProps[]}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] {
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] | undefined {
|
||||
switch (platform) {
|
||||
case 'ios':
|
||||
return [
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { NavPageProps } from './NavPage.doc';
|
||||
|
||||
export const NavPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...NavPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...NavPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { OverflowSetPageProps } from './OverflowSetPage.doc';
|
||||
|
||||
export const OverflowSetPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...OverflowSetPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...OverflowSetPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { OverlayPageProps } from './OverlayPage.doc';
|
||||
|
||||
export const OverlayPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...OverlayPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...OverlayPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { PanelPageProps } from './PanelPage.doc';
|
||||
|
||||
export const PanelPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...PanelPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...PanelPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -13,13 +13,13 @@ export const PeoplePickerPage: React.FunctionComponent<IControlsPageProps> = pro
|
|||
<ControlsAreaPage
|
||||
{...props}
|
||||
title="People Picker"
|
||||
{...PeoplePickerPageProps[platform]}
|
||||
otherSections={_otherSections(platform) as IPageSectionProps[]}
|
||||
{...PeoplePickerPageProps[platform!]}
|
||||
otherSections={_otherSections(platform!) as IPageSectionProps[]}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] {
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] | undefined {
|
||||
switch (platform) {
|
||||
case 'android':
|
||||
return [
|
||||
|
|
|
@ -16,13 +16,13 @@ export const PersonaPage: React.FunctionComponent<IControlsPageProps> = props =>
|
|||
<ControlsAreaPage
|
||||
{...props}
|
||||
title="Persona"
|
||||
{...PersonaPageProps[platform]}
|
||||
otherSections={_otherSections(platform) as IPageSectionProps[]}
|
||||
{...PersonaPageProps[platform!]}
|
||||
otherSections={_otherSections(platform!) as IPageSectionProps[]}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] {
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] | undefined {
|
||||
switch (platform) {
|
||||
case 'ios':
|
||||
return [
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { PickersPageProps } from './PickersPage.doc';
|
||||
|
||||
export const PickersPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...PickersPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...PickersPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -11,7 +11,7 @@ export const PillButtonBarPage: React.FunctionComponent<IControlsPageProps> = pr
|
|||
return (
|
||||
<ControlsAreaPage
|
||||
{...props}
|
||||
{...PillButtonBarPageProps[props.platform]}
|
||||
{...PillButtonBarPageProps[props.platform!]}
|
||||
otherSections={_otherSections(props.platform) as IPageSectionProps[]}
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -10,7 +10,7 @@ export const PivotPage: React.FunctionComponent<IControlsPageProps> = props => {
|
|||
return (
|
||||
<ControlsAreaPage
|
||||
{...props}
|
||||
{...PivotPageProps[props.platform]}
|
||||
{...PivotPageProps[props.platform!]}
|
||||
otherSections={_otherSections(props.platform) as IPageSectionProps[]}
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -13,13 +13,13 @@ export const PopupMenuPage: React.FunctionComponent<IControlsPageProps> = props
|
|||
<ControlsAreaPage
|
||||
{...props}
|
||||
title="Popup Menu"
|
||||
{...PopupMenuPageProps[platform]}
|
||||
otherSections={_otherSections(platform) as IPageSectionProps[]}
|
||||
{...PopupMenuPageProps[platform!]}
|
||||
otherSections={_otherSections(platform!) as IPageSectionProps[]}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] {
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] | undefined {
|
||||
switch (platform) {
|
||||
case 'ios':
|
||||
return [
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { PopupPageProps } from './PopupPage.doc';
|
||||
|
||||
export const PopupPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...PopupPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...PopupPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -5,5 +5,5 @@ import { ProgressIndicatorPageProps } from './ProgressIndicatorPage.doc';
|
|||
export const ProgressIndicatorPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
const { platform } = props;
|
||||
|
||||
return <ControlsAreaPage {...props} title="Progress Indicator" {...ProgressIndicatorPageProps[platform]} />;
|
||||
return <ControlsAreaPage {...props} title="Progress Indicator" {...ProgressIndicatorPageProps[platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { RatingPageProps } from './RatingPage.doc';
|
||||
|
||||
export const RatingPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...RatingPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...RatingPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { ResizeGroupPageProps } from './ResizeGroupPage.doc';
|
||||
|
||||
export const ResizeGroupPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...ResizeGroupPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...ResizeGroupPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { ScrollablePanePageProps } from './ScrollablePanePage.doc';
|
||||
|
||||
export const ScrollablePanePage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...ScrollablePanePageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...ScrollablePanePageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { SearchBoxPageProps } from './SearchBoxPage.doc';
|
||||
|
||||
export const SearchBoxPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...SearchBoxPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...SearchBoxPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { SelectionPageProps } from './SelectionPage.doc';
|
||||
|
||||
export const SelectionPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...SelectionPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...SelectionPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -17,13 +17,13 @@ export const SeparatorPage: React.FunctionComponent<IControlsPageProps> = props
|
|||
<ControlsAreaPage
|
||||
{...props}
|
||||
title="Separator"
|
||||
{...SeparatorPageProps[platform]}
|
||||
otherSections={_otherSections(platform) as any}
|
||||
{...SeparatorPageProps[platform!]}
|
||||
otherSections={_otherSections(platform!) as any}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] {
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] | undefined {
|
||||
switch (platform) {
|
||||
case 'ios':
|
||||
return [
|
||||
|
|
|
@ -12,13 +12,13 @@ export const ShimmerPage: React.FunctionComponent<IControlsPageProps> = props =>
|
|||
<ControlsAreaPage
|
||||
{...props}
|
||||
title="Shimmer"
|
||||
{...ShimmerPageProps[platform]}
|
||||
otherSections={_otherSections(platform) as any}
|
||||
{...ShimmerPageProps[platform!]}
|
||||
otherSections={_otherSections(platform!) as any}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] {
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] | undefined {
|
||||
switch (platform) {
|
||||
case 'ios':
|
||||
return [
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { SliderPageProps } from './SliderPage.doc';
|
||||
|
||||
export const SliderPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...SliderPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...SliderPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -12,13 +12,13 @@ export const SnackbarPage: React.FunctionComponent<IControlsPageProps> = props =
|
|||
return (
|
||||
<ControlsAreaPage
|
||||
{...props}
|
||||
{...SnackbarPageProps[platform]}
|
||||
otherSections={_otherSections(platform) as IPageSectionProps[]}
|
||||
{...SnackbarPageProps[platform!]}
|
||||
otherSections={_otherSections(platform!) as IPageSectionProps[]}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] {
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] | undefined {
|
||||
switch (platform) {
|
||||
case 'android':
|
||||
return [
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { SpinButtonPageProps } from './SpinButtonPage.doc';
|
||||
|
||||
export const SpinButtonPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...SpinButtonPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...SpinButtonPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -10,13 +10,13 @@ export const SpinnerPage: React.FunctionComponent<IControlsPageProps> = props =>
|
|||
<ControlsAreaPage
|
||||
{...props}
|
||||
title="Spinner"
|
||||
{...SpinnerPageProps[platform]}
|
||||
otherSections={_otherSections(platform) as IPageSectionProps[]}
|
||||
{...SpinnerPageProps[platform!]}
|
||||
otherSections={_otherSections(platform!) as IPageSectionProps[]}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] {
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] | undefined {
|
||||
switch (platform) {
|
||||
case 'ios':
|
||||
return [
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { StackPageProps } from './StackPage.doc';
|
||||
|
||||
export const StackPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...StackPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...StackPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { SwatchColorPickerPageProps } from './SwatchColorPickerPage.doc';
|
||||
|
||||
export const SwatchColorPickerPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...SwatchColorPickerPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...SwatchColorPickerPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { TeachingBubblePageProps } from './TeachingBubblePage.doc';
|
||||
|
||||
export const TeachingBubblePage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...TeachingBubblePageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...TeachingBubblePageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { TextFieldPageProps } from './TextFieldPage.doc';
|
||||
|
||||
export const TextFieldPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...TextFieldPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...TextFieldPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -15,13 +15,13 @@ export const TextPage: React.FunctionComponent<IControlsPageProps> = props => {
|
|||
<ControlsAreaPage
|
||||
{...props}
|
||||
title="Text"
|
||||
{...TextPageProps[props.platform]}
|
||||
otherSections={_otherSections(platform) as any}
|
||||
{...TextPageProps[props.platform!]}
|
||||
otherSections={_otherSections(platform!) as any}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] {
|
||||
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] | undefined {
|
||||
switch (platform) {
|
||||
case 'ios':
|
||||
return [
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { ThemeProviderProps } from './ThemeProviderPage.doc';
|
||||
|
||||
export const ThemeProviderPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...ThemeProviderProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...ThemeProviderProps[props.platform!]} />;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,5 @@ import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
|
|||
import { ThemesPageProps } from './ThemesPage.doc';
|
||||
|
||||
export const ThemesPage: React.FunctionComponent<IControlsPageProps> = props => {
|
||||
return <ControlsAreaPage {...props} {...ThemesPageProps[props.platform]} />;
|
||||
return <ControlsAreaPage {...props} {...ThemesPageProps[props.platform!]} />;
|
||||
};
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче