Skip to content

Commit 4088b20

Browse files
fix(components): update the styling to make it applicable to the way snippets work and apply styles
1 parent 2c8443c commit 4088b20

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/components/src/Snippet.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import { CopyToClipboard } from './CopyToClipboard';
4444

4545
import 'prismjs/plugins/line-numbers/prism-line-numbers.css';
4646

47-
import styles from './styles/Snippet.module.css';
47+
import './styles/Snippet.css';
4848

4949
export const languages = [
5050
'bash',
@@ -146,16 +146,16 @@ export function Snippet({
146146
return (
147147
<>
148148
{withHeader && (
149-
<div className={styles.header}>
149+
<div className="header">
150150
{label && <span>{label}</span>}
151151
{lang && <span>{lang}</span>}
152152
</div>
153153
)}
154154
<div
155-
className={`${styles.snippet} ${className ?? ''} ${withCopyButton ? styles.copyable : ''} ${useDefaultHighlighting ? styles.useDefaultHighlighting : ''}`}
155+
className={`snippet ${className ?? ''} ${withCopyButton ? 'copyable' : ''} ${useDefaultHighlighting ? 'useDefaultHighlighting' : ''}`}
156156
>
157157
<pre
158-
className={withLineNumbers ? styles['line-numbers'] : ''}
158+
className={withLineNumbers ? 'line-numbers' : ''}
159159
data-start={1}
160160
data-line-offset={highlightOffset ? highlightOffset.toString() : ''}
161161
data-line={highlightRange}
@@ -166,7 +166,7 @@ export function Snippet({
166166
{withCopyButton && (
167167
<CopyToClipboard text={children as string} showTooltip={false}>
168168
<IconButton
169-
className={styles.copyButton}
169+
className="copyButton"
170170
aria-label="Copy code snippet"
171171
variant="minimal"
172172
icon="copy-code"

0 commit comments

Comments
 (0)