Skip to content

Commit 5ec065d

Browse files
committed
change method about global font apply
1 parent 9588fac commit 5ec065d

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

zeppelin-web-angular/projects/zeppelin-react/src/main.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,4 @@
1010
* limitations under the License.
1111
*/
1212

13-
import './styles/global.css';
14-
1513
export { default as PublishedParagraph, mount } from './pages/PublishedParagraph';

zeppelin-web-angular/projects/zeppelin-react/src/pages/PublishedParagraph.tsx

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212

1313
import { createRoot } from 'react-dom/client';
14+
import { ConfigProvider } from 'antd';
1415
import { Empty } from '@/components';
1516
import { SingleResultRenderer } from '@/templates';
1617
import type { ParagraphResult, ParagraphConfig } from '@/types';
@@ -27,13 +28,21 @@ const PublishedParagraph = ({ results, config }: PublishedParagraphProps) => {
2728
}
2829

2930
return (
30-
<div>
31-
{results.map((result: ParagraphResult, index: number) => (
32-
<div key={index}>
33-
<SingleResultRenderer result={result} config={config} />
34-
</div>
35-
))}
36-
</div>
31+
<ConfigProvider
32+
theme={{
33+
token: {
34+
fontFamily: "'Lucida Console', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace"
35+
}
36+
}}
37+
>
38+
<div>
39+
{results.map((result: ParagraphResult, index: number) => (
40+
<div key={index}>
41+
<SingleResultRenderer result={result} config={config} />
42+
</div>
43+
))}
44+
</div>
45+
</ConfigProvider>
3746
);
3847
};
3948

0 commit comments

Comments
 (0)