Skip to content

Commit 17be2a3

Browse files
committed
chore: add LINES_BEFORE_COLLAPSABLE to constants
1 parent 970c40b commit 17be2a3

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/components/Codeblock.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@ import { Box, BoxProps, Flex, useColorModeValue } from "@chakra-ui/react"
1010

1111
import CopyToClipboard from "@/components/CopyToClipboard"
1212
import Emoji from "@/components/Emoji"
13+
1314
// https://github.com/FormidableLabs/prism-react-renderer/tree/master#custom-language-support
15+
import { LINES_BEFORE_COLLAPSABLE } from "@/lib/constants"
1416
;(typeof global !== "undefined" ? global : window).Prism = Prism
1517
require("prismjs/components/prism-solidity")
1618

17-
// todo: move to constants
18-
export const LINES_BEFORE_COLLAPSABLE = 8
19-
2019
const TopBarItem = (props: BoxProps) => {
2120
const bgColor = useColorModeValue("#f7f7f7", "#363641")
2221

src/lib/constants.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,6 @@ export const DEFAULT_GLOSSARY_NS = "glossary"
149149
export const HAMBURGER_BUTTON_ID = "mobile-menu-button"
150150
export const MOBILE_LANGUAGE_BUTTON_NAME = "mobile-language-button"
151151
export const DESKTOP_LANGUAGE_BUTTON_NAME = "desktop-language-button"
152+
153+
// Codeblock
154+
export const LINES_BEFORE_COLLAPSABLE = 8

0 commit comments

Comments
 (0)