File tree Expand file tree Collapse file tree 12 files changed +7
-21
lines changed Expand file tree Collapse file tree 12 files changed +7
-21
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export const IconChevron = React.memo<
9
9
JSX . IntrinsicElements [ 'svg' ] & {
10
10
displayDirection : 'up' | 'down' | 'left' | 'right' ;
11
11
}
12
- > ( function IconChevron ( { className, displayDirection, ... rest } ) {
12
+ > ( function IconChevron ( { className, displayDirection} ) {
13
13
const classes = cn (
14
14
{
15
15
'rotate-0' : displayDirection === 'down' ,
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export const IconNavArrow = React.memo<
9
9
JSX . IntrinsicElements [ 'svg' ] & {
10
10
displayDirection : 'right' | 'down' | 'left' ;
11
11
}
12
- > ( function IconNavArrow ( { displayDirection = 'right' , className, ... rest } ) {
12
+ > ( function IconNavArrow ( { displayDirection = 'right' , className} ) {
13
13
const classes = cn (
14
14
'duration-100 ease-in transition' ,
15
15
{
Original file line number Diff line number Diff line change @@ -9,13 +9,12 @@ import {MenuContext} from 'components/useMenu';
9
9
import { useMediaQuery } from '../useMediaQuery' ;
10
10
import { SidebarRouteTree } from './SidebarRouteTree' ;
11
11
import { Search } from 'components/Search' ;
12
- import { Button } from 'components/Button' ;
13
12
import { MobileNav } from '../Nav/MobileNav' ;
14
13
import { Feedback } from '../Feedback' ;
15
14
16
15
const SIDEBAR_BREAKPOINT = 1023 ;
17
16
18
- export function Sidebar ( { isMobileOnly } : { isMobileOnly ?: boolean } ) {
17
+ export function Sidebar ( ) {
19
18
const { menuRef, isOpen} = React . useContext ( MenuContext ) ;
20
19
const isMobileSidebar = useMediaQuery ( SIDEBAR_BREAKPOINT ) ;
21
20
let routeTree = React . useContext ( SidebarContext ) ;
Original file line number Diff line number Diff line change @@ -23,13 +23,11 @@ const CodeBlock = function CodeBlock({
23
23
className = 'language-js' ,
24
24
metastring,
25
25
noMargin,
26
- noMarkers,
27
26
} : {
28
27
children : string ;
29
28
className ?: string ;
30
29
metastring : string ;
31
30
noMargin ?: boolean ;
32
- noMarkers ?: boolean ;
33
31
} ) {
34
32
const getDecoratedLineInfo = ( ) => {
35
33
if ( ! metastring ) {
Original file line number Diff line number Diff line change 2
2
* Copyright (c) Facebook, Inc. and its affiliates.
3
3
*/
4
4
5
- import React , { ReactNode } from 'react' ;
5
+ import React from 'react' ;
6
6
7
7
export interface IntroProps {
8
8
children ?: React . ReactNode ;
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ function Link({
17
17
const classes =
18
18
'inline text-link dark:text-link-dark break-normal border-b border-link border-opacity-0 hover:border-opacity-100 duration-100 ease-in transition leading-normal' ;
19
19
const modifiedChildren = React . Children . toArray ( children ) . map (
20
- ( child : any , idx : number ) => {
20
+ ( child : any ) => {
21
21
if ( child . props ?. mdxType && child . props ?. mdxType === 'inlineCode' ) {
22
22
return React . cloneElement ( child , {
23
23
isLink : true ,
Original file line number Diff line number Diff line change @@ -200,14 +200,12 @@ function Illustration({
200
200
alt,
201
201
author,
202
202
authorLink,
203
- children,
204
203
} : {
205
204
caption : string ;
206
205
src : string ;
207
206
alt : string ;
208
207
author : string ;
209
208
authorLink : string ;
210
- children : any ;
211
209
} ) {
212
210
return (
213
211
< div className = "my-16 mx-0 2xl:mx-auto max-w-4xl 2xl:max-w-6xl" >
Original file line number Diff line number Diff line change 5
5
import * as React from 'react' ;
6
6
import { IconRestart } from '../../Icon/IconRestart' ;
7
7
export interface ResetButtonProps {
8
- clientId ?: string ;
9
8
onReset : ( ) => void ;
10
9
}
11
10
12
- export const ResetButton : React . FC < ResetButtonProps > = ( {
13
- clientId,
14
- onReset,
15
- } ) => {
11
+ export const ResetButton : React . FC < ResetButtonProps > = ( { onReset} ) => {
16
12
return (
17
13
< button
18
14
className = "text-sm text-primary dark:text-primary-dark inline-flex items-center hover:text-link duration-100 ease-in transition mx-1"
Original file line number Diff line number Diff line change @@ -49,8 +49,6 @@ export const computeViewportSize = (
49
49
} ;
50
50
51
51
export const createFileMap = ( codeSnippets : any ) => {
52
- let isSingleFile = true ;
53
-
54
52
return codeSnippets . reduce (
55
53
( result : Record < string , SandpackFile > , codeSnippet : React . ReactElement ) => {
56
54
if ( codeSnippet . props . mdxType !== 'pre' ) {
@@ -70,7 +68,6 @@ export const createFileMap = (codeSnippets: any) => {
70
68
if ( params . includes ( 'active' ) ) {
71
69
fileActive = true ;
72
70
}
73
- isSingleFile = false ;
74
71
} else {
75
72
if ( props . className === 'language-js' ) {
76
73
filePath = '/App.js' ;
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import {
10
10
} from 'body-scroll-lock' ;
11
11
import { useRouter } from 'next/router' ;
12
12
13
- type SidebarNav = 'root' | 'docs' | 'apis' ;
14
13
/**
15
14
* Menu toggle that enables body scroll locking (for
16
15
* iOS Mobile and Tablet, Android, desktop Safari/Chrome/Firefox)
You can’t perform that action at this time.
0 commit comments