1
1
import { Element , useEditor } from '@craftjs/core' ;
2
2
import { Tooltip } from '@material-ui/core' ;
3
3
import React from 'react' ;
4
- import styled from 'styled-components' ;
4
+ import { styled } from 'styled-components' ;
5
5
6
6
import ButtonSvg from '../../../public/icons/toolbox/button.svg' ;
7
7
import SquareSvg from '../../../public/icons/toolbox/rectangle.svg' ;
@@ -12,20 +12,20 @@ import { Container } from '../../selectors/Container';
12
12
import { Text } from '../../selectors/Text' ;
13
13
import { Video } from '../../selectors/Video' ;
14
14
15
- const ToolboxDiv = styled . div < { enabled : boolean } > `
15
+ const ToolboxDiv = styled . div < { $ enabled : boolean } > `
16
16
transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);
17
- ${ ( props ) => ( ! props . enabled ? `width: 0;` : '' ) }
18
- ${ ( props ) => ( ! props . enabled ? `opacity: 0;` : '' ) }
17
+ ${ ( props ) => ( ! props . $ enabled ? `width: 0;` : '' ) }
18
+ ${ ( props ) => ( ! props . $ enabled ? `opacity: 0;` : '' ) }
19
19
` ;
20
20
21
- const Item = styled . a < { move ?: boolean } > `
21
+ const Item = styled . a < { $ move ?: boolean } > `
22
22
svg {
23
23
width: 22px;
24
24
height: 22px;
25
25
fill: #707070;
26
26
}
27
27
${ ( props ) =>
28
- props . move &&
28
+ props . $ move &&
29
29
`
30
30
cursor: move;
31
31
` }
@@ -41,7 +41,7 @@ export const Toolbox = () => {
41
41
42
42
return (
43
43
< ToolboxDiv
44
- enabled = { enabled && enabled }
44
+ $ enabled= { enabled && enabled }
45
45
className = "toolbox transition w-12 h-full flex flex-col bg-white"
46
46
>
47
47
< div className = "flex flex-1 flex-col items-center pt-3" >
@@ -61,7 +61,7 @@ export const Toolbox = () => {
61
61
}
62
62
>
63
63
< Tooltip title = "Container" placement = "right" >
64
- < Item className = "m-2 pb-2 cursor-pointer block" move >
64
+ < Item className = "m-2 pb-2 cursor-pointer block" $ move>
65
65
< SquareSvg />
66
66
</ Item >
67
67
</ Tooltip >
@@ -72,21 +72,21 @@ export const Toolbox = () => {
72
72
}
73
73
>
74
74
< Tooltip title = "Text" placement = "right" >
75
- < Item className = "m-2 pb-2 cursor-pointer block" move >
75
+ < Item className = "m-2 pb-2 cursor-pointer block" $ move>
76
76
< TypeSvg />
77
77
</ Item >
78
78
</ Tooltip >
79
79
</ div >
80
80
< div ref = { ( ref ) => create ( ref , < Button /> ) } >
81
81
< Tooltip title = "Button" placement = "right" >
82
- < Item className = "m-2 pb-2 cursor-pointer block" move >
82
+ < Item className = "m-2 pb-2 cursor-pointer block" $ move>
83
83
< ButtonSvg />
84
84
</ Item >
85
85
</ Tooltip >
86
86
</ div >
87
87
< div ref = { ( ref ) => create ( ref , < Video /> ) } >
88
88
< Tooltip title = "Video" placement = "right" >
89
- < Item className = "m-2 pb-2 cursor-pointer block" move >
89
+ < Item className = "m-2 pb-2 cursor-pointer block" $ move>
90
90
< YoutubeSvg />
91
91
</ Item >
92
92
</ Tooltip >
0 commit comments