Skip to content
This repository was archived by the owner on Jan 23, 2024. It is now read-only.

Commit 96401e2

Browse files
committed
chore: update pkgs and revert version switcher
1 parent 2acf8ac commit 96401e2

File tree

5 files changed

+171
-225
lines changed

5 files changed

+171
-225
lines changed

package.json

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,69 +19,69 @@
1919
},
2020
"dependencies": {
2121
"@chakra-ui/cli": "1.6.0",
22-
"@chakra-ui/props-docs": "1.0.39",
23-
"@chakra-ui/react": "1.7.1",
22+
"@chakra-ui/props-docs": "1.0.40",
23+
"@chakra-ui/react": "1.7.2",
2424
"@chakra-ui/theme-tools": "1.3.1",
2525
"@chakra-ui/utils": "1.9.1",
2626
"@chakra-ui/skip-nav": "^1.2.1",
2727
"@chakra-ui/icons": "^1.1.1",
2828
"@docsearch/react": "^1.0.0-alpha.27",
2929
"@docusaurus/utils": "^2.0.0-alpha.69",
30-
"@emotion/react": "^11.1.4",
31-
"@emotion/styled": "^11.0.0",
32-
"@octokit/rest": "^18.0.12",
30+
"@emotion/react": "^11.6.0",
31+
"@emotion/styled": "^11.6.0",
32+
"@octokit/rest": "^18.12.0",
3333
"contentlayer": "^0.0.32",
34-
"date-fns": "^2.16.1",
34+
"date-fns": "^2.25.0",
3535
"docsearch.js": "^2.6.3",
3636
"focus-visible": "5.2.0",
3737
"formik": "^2.2.9",
3838
"framer-motion": "^4.1.17",
39-
"github-slugger": "^1.3.0",
39+
"github-slugger": "^1.4.0",
4040
"highlight-words-core": "^1.2.2",
4141
"lodash": "^4.17.21",
4242
"markdown-toc": "^1.2.0",
43-
"match-sorter": "^6.1.0",
43+
"match-sorter": "^6.3.1",
4444
"mdx-bundler": "^7.0.0",
45-
"next": "^12.0.1",
45+
"next": "^12.0.4",
4646
"next-contentlayer": "^0.0.32",
47-
"next-seo": "^4.17.0",
47+
"next-seo": "^4.28.1",
4848
"prism-react-renderer": "^1.1.1",
49-
"react": "^17.0.1",
50-
"react-dom": "^17.0.1",
51-
"react-focus-lock": "^2.5.2",
52-
"react-icons": "^4.1.0",
53-
"react-live": "^2.2.3",
49+
"react": "^17.0.2",
50+
"react-dom": "^17.0.2",
51+
"react-focus-lock": "^2.6.0",
52+
"react-icons": "^4.3.1",
53+
"react-live": "^2.3.0",
5454
"react-lorem-component": "^0.13.0",
5555
"react-player": "^2.9.0",
5656
"react-spinners": "^0.11.0",
5757
"react-table": "^7.7.0",
5858
"remark": "^14.0.1",
59-
"remark-emoji": "^3.0.1",
59+
"remark-emoji": "^3.0.2",
6060
"remark-gfm": "^3.0.1",
6161
"remark-slug": "^7.0.1",
6262
"scroll-into-view-if-needed": "^2.2.28",
6363
"shelljs": "^0.8.4",
64-
"superjson": "^1.7.4",
65-
"typescript": "^4.1.3",
64+
"superjson": "^1.8.0",
65+
"typescript": "^4.5.2",
6666
"uuid": "^8.3.2"
6767
},
6868
"devDependencies": {
6969
"@types/github-slugger": "^1.3.0",
70-
"@types/node": "^14.14.19",
71-
"@types/react": "^17.0.0",
72-
"@types/react-dom": "^17.0.0",
73-
"@types/sharp": "^0.26.1",
74-
"babel-plugin-superjson-next": "^0.3.0",
70+
"@types/node": "^16.11.7",
71+
"@types/react": "^17.0.35",
72+
"@types/react-dom": "^17.0.11",
73+
"@types/sharp": "^0.29.4",
74+
"babel-plugin-superjson-next": "^0.4.2",
7575
"dotenv": "^10.0.0",
76-
"eslint": "<8.0.0",
77-
"eslint-config-next": "^12.0.1",
76+
"eslint": "^8.2.0",
77+
"eslint-config-next": "^12.0.4",
7878
"eslint-config-prettier": "^8.3.0",
7979
"eslint-plugin-prettier": "^4.0.0",
8080
"imagemin": "7.0.1",
8181
"imagemin-jpegtran": "7.0.0",
8282
"prettier": "^2.4.1",
8383
"react-multi-ref": "^1.0.0",
84-
"ts-node": "9.1.1",
84+
"ts-node": "10.4.0",
8585
"yarn-deduplicate": "^3.1.0"
8686
}
8787
}

src/components/header.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import Logo, { LogoIcon } from './logo';
2121
import { MobileNavButton, MobileNavContent } from './mobile-nav';
2222
import Search from './omni-search';
2323
import SponsorButton from './sponsor-button';
24+
import VersionSwitcher from './version-switcher';
2425

2526
const DiscordIcon = (props: React.ComponentProps<'svg'>) => (
2627
<svg viewBox='0 0 146 146' {...props}>
@@ -76,6 +77,11 @@ function HeaderContent() {
7677
maxW='1100px'
7778
>
7879
<Search />
80+
<VersionSwitcher
81+
width='auto'
82+
flexShrink={0}
83+
display={{ base: 'none', md: 'flex' }}
84+
/>
7985
<HStack spacing='5' display={{ base: 'none', md: 'flex' }}>
8086
<Link
8187
isExternal

src/components/props-table.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// import * as ComponentProps from "@chakra-ui/props-docs"
1+
import * as ComponentProps from '@chakra-ui/props-docs';
22
import { chakra, Code, Flex, HStack, Stack, theme } from '@chakra-ui/react';
33
import Link from 'next/link';
44
import * as React from 'react';
@@ -19,7 +19,7 @@ export type PropsTableProps = {
1919
/**
2020
* displayName of the target component
2121
*/
22-
of: string;
22+
of: keyof typeof ComponentProps;
2323
/**
2424
* prop names to omit
2525
*/
@@ -137,8 +137,7 @@ interface MakePropsTableOptions extends PropsTableProps {}
137137
const TYPE_GENERIC_THEMABLE = '(string & {})';
138138

139139
function makePropsTable({ of, omit, only }: MakePropsTableOptions) {
140-
// const props = ComponentProps[of]?.props as Record<string, any>
141-
const props = {} as Record<string, any>;
140+
const props = ComponentProps[of]?.props;
142141

143142
const themeKey = themeComponentKeyAliases[of] ?? of;
144143
const componentTheme = theme.components[themeKey];

src/utils/convert-backticks-to-inline-code.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function toInlineCode(input: string) {
2020
);
2121
}
2222

23-
export function convertBackticksToInlineCode(input?: string) {
23+
export function convertBackticksToInlineCode(input?: string | JSX.Element) {
2424
if (!input) return '';
2525
return isObject(input) ? input : toInlineCode(input);
2626
}

0 commit comments

Comments
 (0)