api-reports and prettier

Co-authored-by: Camila Belo <camilaibs@gmail.com>
Co-authored-by: Eric Peterson <ericpeterson@spotify.com>
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
This commit is contained in:
Emma Indal
2022-04-01 15:19:51 +02:00
parent 377309a98b
commit a122923bd0
4 changed files with 16 additions and 13 deletions
@@ -66,4 +66,4 @@
"last 1 safari version"
]
}
}
}
@@ -14,9 +14,7 @@
* limitations under the License.
*/
import React, {
useState,
} from 'react';
import React, { useState } from 'react';
import { Theme, makeStyles } from '@material-ui/core';
@@ -54,9 +52,11 @@ enum Themes {
}
export const TechDocsThemeToggle = () => {
const appThemeApi = useApi(appThemeApiRef)
const appThemeApi = useApi(appThemeApiRef);
const classes = useStyles();
const [theme, setTheme] = useState<Themes>(appThemeApi.getActiveThemeId() as Themes || Themes.LIGHT);
const [theme, setTheme] = useState<Themes>(
(appThemeApi.getActiveThemeId() as Themes) || Themes.LIGHT,
);
const themes = {
[Themes.LIGHT]: {
@@ -77,7 +77,7 @@ export const TechDocsThemeToggle = () => {
appThemeApi.setActiveThemeId(newTheme);
return newTheme;
});
}
};
return (
<Box display="flex" alignItems="center" mr={2}>
@@ -96,7 +96,7 @@ const DefaultTechDocsPage = () => {
<TechDocsReaderPageHeader />
<TechDocsReaderPageContent withSearch={false} />
</TechDocsReaderPage>
)
}
);
};
export const techDocsPage = <DefaultTechDocsPage />
export const techDocsPage = <DefaultTechDocsPage />;
+4 -1
View File
@@ -174,6 +174,9 @@ export interface PanelConfig {
// @public
export type PanelType = 'DocsCardGrid' | 'DocsTable';
// @public @deprecated
export const Reader: (props: TechDocsReaderPageContentProps) => JSX.Element;
// @public
export type ReaderState = {
state: ContentStateTypes;
@@ -327,7 +330,7 @@ export type TechDocsReaderPageContentProps = {
// @public
export const TechDocsReaderPageHeader: (
_props: TechDocsReaderPageHeaderProps,
props: TechDocsReaderPageHeaderProps,
) => JSX.Element;
// @public @deprecated
@@ -83,11 +83,11 @@ export type TechDocsReaderPageProps = {
*/
export const TechDocsReaderPage = ({
entityRef,
children
children,
}: TechDocsReaderPageProps) => {
const { kind, name, namespace } = useParams();
const outlet = useOutlet()
const outlet = useOutlet();
const entityName = entityRef ?? { kind, name, namespace };
if (!children) {