Skip to content

Commit f00c51f

Browse files
committed
update docusaurus
1 parent 8337528 commit f00c51f

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

website/src/components/Chip.tsx renamed to website/src/components/Note.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import React, { useState } from 'react';
22
import AnimateHeight from 'react-animate-height';
33

4-
type ChipProps = {
4+
type NoteProps = {
55
children?: string;
66
};
77

8-
export const Chip = ({ children }: ChipProps) => {
8+
export const Note = ({ children }: NoteProps) => {
99
const [descriptionHeight, setDescriptionHeight] = useState<'auto' | 0>(0);
1010

1111
return (

website/src/components/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
export * from './Chip';
21
export * from './GithubStats';
32
export * from './MainTitle';
3+
export * from './Note';
44
export * from './Rule';
55
export * from './TableOfContents';

website/src/pages/index.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ toc_min_heading_level: 2
55
toc_max_heading_level: 2
66
---
77

8-
import { Chip, MainTitle, Rule, TableOfContents } from '@site/src/components';
8+
import { MainTitle, Note, Rule, TableOfContents } from '@site/src/components';
99
import { UseDocumentTitle } from '@site/src/hooks';
1010

1111
<UseDocumentTitle>TypeScript Style Guide</UseDocumentTitle>
@@ -77,10 +77,10 @@ Being expressive and keeping types as **narrow as possible** brings benefits to
7777

7878
As rule of thumb, explicitly declare a type when it help narrows it.
7979

80-
<Chip>
80+
<Note>
8181
Just because you don't need to add types, doesn't mean you shouldn't. In some cases explicit type declaration can
8282
increase code readability and intent.
83-
</Chip>
83+
</Note>
8484

8585
```ts
8686
// ❌ Avoid - Don't explicitly declare a type, it can be inferred.
@@ -346,11 +346,11 @@ TypeScript offers two options for type definitions - `type` and `interface`. As
346346

347347
All types must be defined with `type` alias <Rule href='https://typescript-eslint.io/rules/consistent-type-definitions/#type' />.
348348

349-
<Chip>
349+
<Note>
350350
Consider using interfaces if developing a package that can be further extended, team is more comfortable working with
351351
interfaces etc. In such case disable lint rule where needed e.g. using type unions (type Status = 'loading' | 'error')
352352
etc.
353-
</Chip>
353+
</Note>
354354

355355
```ts
356356
// ❌ Avoid interface definitions
@@ -392,10 +392,10 @@ app.listen(process.env.PORT, () => {...}
392392
393393
Array types must be defined with generic syntax <Rule href='https://typescript-eslint.io/rules/array-type/#generic' />.
394394
395-
<Chip>
395+
<Note>
396396
As there is no functional difference between 'generic' and 'array' definition, feel free to set the one your team
397397
finds most readable to work with.
398-
</Chip>
398+
</Note>
399399
400400
```ts
401401
// ❌ Avoid

0 commit comments

Comments
 (0)