Skip to content

Commit 6717b3d

Browse files
committed
Merge branch 'master' into configure-welcome-popup
2 parents 0bd1d1a + e155a20 commit 6717b3d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/components/Cell/Cell.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import { stringify } from 'hightable'
22
import { asyncBufferFromUrl, parquetMetadataAsync } from 'hyparquet'
33
import { useEffect, useState } from 'react'
4+
import { useConfig } from '../../hooks/useConfig.js'
45
import type { FileSource } from '../../lib/sources/types.js'
56
import { parquetDataFrame } from '../../lib/tableProvider.js'
7+
import { cn } from '../../lib/utils.js'
68
import Breadcrumb from '../Breadcrumb/Breadcrumb.js'
79
import Layout from '../Layout/Layout.js'
10+
import styles from '../TextView/TextView.module.css'
811

912
interface CellProps {
1013
source: FileSource
@@ -19,6 +22,7 @@ export default function CellView({ source, row, col }: CellProps) {
1922
const [text, setText] = useState<string | undefined>()
2023
const [progress, setProgress] = useState<number>()
2124
const [error, setError] = useState<Error>()
25+
const { customClass } = useConfig()
2226

2327
// File path from url
2428
const { resolveUrl, requestInit, fileName } = source
@@ -69,7 +73,7 @@ export default function CellView({ source, row, col }: CellProps) {
6973
<Breadcrumb source={source} />
7074

7175
{/* <Highlight text={text || ''} /> */}
72-
<pre className="viewer text">{text}</pre>
76+
<pre className={cn(styles.textView, customClass?.textView)}>{text}</pre>
7377
</Layout>
7478
)
7579
}

src/components/CellPanel/CellPanel.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { DataFrame, stringify } from 'hightable'
22
import { useEffect, useState } from 'react'
3+
import { useConfig } from '../../hooks/useConfig.js'
4+
import { cn } from '../../lib/utils.js'
35
import ContentWrapper from '../ContentWrapper/ContentWrapper.js'
46
import SlideCloseButton from '../SlideCloseButton/SlideCloseButton.js'
57
import styles from '../TextView/TextView.module.css'
@@ -18,6 +20,7 @@ interface ViewerProps {
1820
*/
1921
export default function CellPanel({ df, row, col, setProgress, setError, onClose }: ViewerProps) {
2022
const [text, setText] = useState<string | undefined>()
23+
const { customClass } = useConfig()
2124

2225
// Load cell data
2326
useEffect(() => {
@@ -57,6 +60,6 @@ export default function CellPanel({ df, row, col, setProgress, setError, onClose
5760
</>
5861

5962
return <ContentWrapper headers={headers}>
60-
<code className={styles.textView}>{text}</code>
63+
<code className={cn(styles.textView, customClass?.textView)}>{text}</code>
6164
</ContentWrapper>
6265
}

0 commit comments

Comments
 (0)