Skip to content

Commit

Permalink
feat: scrolly scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
JuroUhlar committed Jun 13, 2024
1 parent 9f69b22 commit 4c6f33d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/playground/Playground.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { FunctionComponent } from 'react';
import { CodeSnippet } from '../../client/components/CodeSnippet';
import { CodeSnippet } from '../../client/components/common/CodeSnippet/CodeSnippet';
import dynamic from 'next/dynamic';
import SignalTable, { TableCellData } from './components/SignalTable';
import BotDetectionResult from './components/BotDetectionResult';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { PropsWithChildren } from 'react';
import { PrismAsyncLight } from 'react-syntax-highlighter';
import lightTheme from 'react-syntax-highlighter/dist/cjs/styles/prism/coy';
import darkTheme from 'react-syntax-highlighter/dist/cjs/styles/prism/coldark-dark';
import styles from './CodeSnippet.module.scss';
import classnames from 'classnames';

export interface CodeSnippetProps {
language: string;
Expand Down Expand Up @@ -48,7 +50,7 @@ export function CodeSnippet({
style={hasDarkMode ? darkTheme : lightTheme}
customStyle={PRISM_CUSTOM_STYLE}
codeTagProps={PRISM_CODE_TAG_PROPS}
className={className}
className={classnames(styles.snippet, className)}
data-testid={dataTestId}
>
{children}
Expand Down
22 changes: 22 additions & 0 deletions src/styles/global-styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,25 @@ button {
img {
vertical-align: middle;
}

body {
scrollbar-width: thin;
scrollbar-color: #c1c1c1 transparent;
}

// /* Works on Chrome, Edge, and Safari */
*::-webkit-scrollbar {
width: 6px;
height: 6px;
background: transparent;
}

*::-webkit-scrollbar-track {
background: transparent;
border-radius: 6px;
}

*::-webkit-scrollbar-thumb {
background-color: #c1c1c1;
border-radius: 6px;
}

0 comments on commit 4c6f33d

Please sign in to comment.