docs(v2): fix npm/yarn command example for swizzling TypeScript theme components (#4230)

This commit is contained in:
Yash Totale 2021-02-17 03:28:36 -08:00 committed by GitHub
parent bb63e093f1
commit cf080c72ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,7 +29,7 @@ Now you can start writing TypeScript theme components.
For themes that supports TypeScript theme components, you can add the `--typescript` flag to the end of swizzling command to get TypeScript source code. For example, the following command will generate `index.tsx` and `styles.module.css` into `src/theme/Footer`.
```bash npm2yarn
npm run swizzle @docusaurus/theme-classic Footer --typescript
npm run swizzle @docusaurus/theme-classic Footer -- --typescript
```
At this moment, the only official Docusaurus theme that supports TypeScript theme components is `@docusaurus/theme-classic`. If you are a Docusaurus theme package author who wants to add TypeScript support, see the [Lifecycle APIs docs](./lifecycle-apis.md#gettypescriptthemepath).