File tree Expand file tree Collapse file tree 3 files changed +14
-6
lines changed
client/packages/lowcoder-design/src/components Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 11import { CSSProperties } from "react" ;
2- import { Ref } from "react" ;
3- import ReactPlayer from "react-player" ;
2+ import { lazy , Ref } from "react" ;
3+ import type { default as ReactPlayerType } from "react-player" ;
44import styled from "styled-components" ;
55
6+ const ReactPlayer = lazy ( ( ) => import ( "react-player" ) ) ;
7+
68const Audio = styled ( ReactPlayer ) `
79 height: 32px !important;
810` ;
@@ -14,7 +16,7 @@ export function TacoAudio(props: {
1416 onEnded ?: ( ) => void ;
1517 className ?: string ;
1618 style ?: CSSProperties ;
17- audioRef ?: Ref < ReactPlayer > ;
19+ audioRef ?: Ref < ReactPlayerType > ;
1820 autoPlay ?: boolean ;
1921 loop ?: boolean ;
2022} ) {
Original file line number Diff line number Diff line change 11import { css } from "styled-components" ;
2- import ReactMarkdown from "react-markdown" ;
2+ import { lazy } from "react" ;
3+ // import ReactMarkdown from "react-markdown";
34import rehypeRaw from "rehype-raw" ;
45import rehypeSanitize , { defaultSchema } from "rehype-sanitize" ;
56import remarkGfm from "remark-gfm" ;
6- import { ReactMarkdownOptions } from "react-markdown/lib/react-markdown" ;
7+ import type { ReactMarkdownOptions } from "react-markdown/lib/react-markdown" ;
8+
9+ const ReactMarkdown = lazy ( ( ) => import ( 'react-markdown' ) ) ;
710
811export const markdownCompCss = css `
912 .markdown-body {
Original file line number Diff line number Diff line change 1- import ReactPlayer from "react-player" ;
1+ // import ReactPlayer from "react-player";
2+ import { lazy } from 'react' ;
23import styled from "styled-components" ;
34import { videoPlayTriangle } from "icons" ;
45
6+ const ReactPlayer = lazy ( ( ) => import ( "react-player" ) ) ;
7+
58export const Video = styled ( ReactPlayer ) `
69 height: 100% !important;
710 width: 100% !important;
You can’t perform that action at this time.
0 commit comments