mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-19 19:22:28 +02:00
refactor: unify export directive style (#6751)
This commit is contained in:
parent
0c807b3501
commit
0d14470d54
105 changed files with 315 additions and 510 deletions
|
@ -11,7 +11,7 @@ import type {Props} from '@theme/BlogPostAuthor';
|
|||
|
||||
import styles from './styles.module.css';
|
||||
|
||||
function ChangelogAuthor({author}: Props): JSX.Element {
|
||||
export default function ChangelogAuthor({author}: Props): JSX.Element {
|
||||
const {name, url, imageURL} = author;
|
||||
return (
|
||||
<div className="avatar margin-bottom--sm">
|
||||
|
@ -33,5 +33,3 @@ function ChangelogAuthor({author}: Props): JSX.Element {
|
|||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default ChangelogAuthor;
|
||||
|
|
|
@ -18,7 +18,7 @@ import type {Props} from '@theme/BlogPostItem';
|
|||
import styles from './styles.module.css';
|
||||
import ChangelogAuthors from '@theme/ChangelogAuthors';
|
||||
|
||||
function ChangelogItem(props: Props): JSX.Element {
|
||||
export default function ChangelogItem(props: Props): JSX.Element {
|
||||
const {withBaseUrl} = useBaseUrlUtils();
|
||||
const {
|
||||
children,
|
||||
|
@ -75,5 +75,3 @@ function ChangelogItem(props: Props): JSX.Element {
|
|||
</article>
|
||||
);
|
||||
}
|
||||
|
||||
export default ChangelogItem;
|
||||
|
|
|
@ -15,7 +15,7 @@ import ChangelogItem from '@theme/ChangelogItem';
|
|||
|
||||
import styles from './styles.module.css';
|
||||
|
||||
function ChangelogList(props: Props): JSX.Element {
|
||||
export default function ChangelogList(props: Props): JSX.Element {
|
||||
const {metadata, items, sidebar} = props;
|
||||
const {blogDescription, blogTitle} = metadata;
|
||||
|
||||
|
@ -88,5 +88,3 @@ function ChangelogList(props: Props): JSX.Element {
|
|||
</BlogLayout>
|
||||
);
|
||||
}
|
||||
|
||||
export default ChangelogList;
|
||||
|
|
|
@ -18,7 +18,7 @@ import Link from '@docusaurus/Link';
|
|||
// This page doesn't change anything. It's just swapping BlogPostItem with our
|
||||
// own ChangelogItem. We don't want to apply the swizzled item to the actual
|
||||
// blog.
|
||||
function BlogPostPage(props: Props): JSX.Element {
|
||||
export default function BlogPostPage(props: Props): JSX.Element {
|
||||
const {content: BlogPostContents, sidebar} = props;
|
||||
const {assets, metadata} = BlogPostContents;
|
||||
const {
|
||||
|
@ -99,5 +99,3 @@ function BlogPostPage(props: Props): JSX.Element {
|
|||
</BlogLayout>
|
||||
);
|
||||
}
|
||||
|
||||
export default BlogPostPage;
|
||||
|
|
|
@ -9,7 +9,7 @@ import React from 'react';
|
|||
|
||||
import type {Props} from '@theme/IconExpand';
|
||||
|
||||
function IconExpand({expanded, ...props}: Props): JSX.Element {
|
||||
export default function IconExpand({expanded, ...props}: Props): JSX.Element {
|
||||
if (expanded) {
|
||||
return (
|
||||
<svg
|
||||
|
@ -33,5 +33,3 @@ function IconExpand({expanded, ...props}: Props): JSX.Element {
|
|||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
export default IconExpand;
|
||||
|
|
|
@ -15,6 +15,5 @@ declare module '@theme/IconExpand' {
|
|||
expanded?: boolean;
|
||||
}
|
||||
|
||||
const IconExpand: (props: Props) => JSX.Element;
|
||||
export default IconExpand;
|
||||
export default function IconExpand(props: Props): JSX.Element;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,11 @@ import styles from './styles.module.css';
|
|||
|
||||
const BOARD_TOKEN = '054e0e53-d951-b14c-7e74-9eb8f9ed2f91';
|
||||
|
||||
function FeatureRequests({basePath}: {basePath: string}): JSX.Element {
|
||||
export default function FeatureRequests({
|
||||
basePath,
|
||||
}: {
|
||||
basePath: string;
|
||||
}): JSX.Element {
|
||||
useEffect(() => {
|
||||
cannyScript();
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
|
@ -34,5 +38,3 @@ function FeatureRequests({basePath}: {basePath: string}): JSX.Element {
|
|||
</Layout>
|
||||
);
|
||||
}
|
||||
|
||||
export default FeatureRequests;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue