File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -7,9 +7,21 @@ export type Tree = {
7
7
}
8
8
9
9
export interface BeautifulTreeProps {
10
- tree : Tree
10
+ id : string ,
11
+ svgProps : {
12
+ width : number ,
13
+ height : number ,
14
+ } ,
15
+ tree : Tree ,
11
16
}
12
17
13
- export const BeautifulTree = ( props : BeautifulTreeProps ) => {
14
- console . log ( props )
18
+ export function BeautifulTree ( props : BeautifulTreeProps ) {
19
+ return (
20
+ < svg
21
+ xmlns = "http://www.w3.org/2000/svg"
22
+ id = { props . id }
23
+ viewBox = { `0 0 ${ props . svgProps . width } ${ props . svgProps . height } ` }
24
+ className = { 'beautiful-tree-react' }
25
+ > </ svg >
26
+ )
15
27
}
Original file line number Diff line number Diff line change @@ -17,12 +17,13 @@ export default defineConfig({
17
17
rollupOptions : {
18
18
// make sure to externalize deps that shouldn't be bundled
19
19
// into your library
20
- external : [ 'react' ] ,
20
+ external : [ 'react' , 'react-dom' ] ,
21
21
output : {
22
22
// Provide global variables to use in the UMD build
23
23
// for externalized deps
24
24
globals : {
25
25
react : 'React' ,
26
+ 'react-dom' : 'ReactDOM' ,
26
27
} ,
27
28
} ,
28
29
} ,
You can’t perform that action at this time.
0 commit comments