File tree Expand file tree Collapse file tree 4 files changed +24
-16
lines changed Expand file tree Collapse file tree 4 files changed +24
-16
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ function App() {
125
125
return (
126
126
< div id = "container" >
127
127
< Sidebar
128
+ addLineWidth = { addLineWidth }
128
129
clearOnClick = { clearOnClick }
129
130
ref = { sidebarRef }
130
131
id = "clear"
Original file line number Diff line number Diff line change @@ -10,7 +10,11 @@ function Sidebar(props){
10
10
ref = { props . ref }
11
11
>
12
12
< Header toggleMenu = { props . toggleMenu } > </ Header >
13
- < Toolbar clearOnClick = { props . clearOnClick } id = { props . id } > </ Toolbar >
13
+ < Toolbar
14
+ clearOnClick = { props . clearOnClick }
15
+ id = { props . id }
16
+ addLineWidth = { props . addLineWidth }
17
+ > </ Toolbar >
14
18
< LoginAndLogout > </ LoginAndLogout >
15
19
</ div >
16
20
) ;
Original file line number Diff line number Diff line change 1
- function StrokeWidthPicker ( ) {
2
- return (
3
- < div className = "flex p-1 items-center justify-around mt-4" >
4
- < h1 className = "font-sans text-lg antialiased font-semibold text-white" >
5
- Stroke :
6
- </ h1 >
7
- < input
8
- type = "number"
9
- placeholder = "2"
10
- defaultValue = { 2 }
11
- className = "w-12 p-1 h-8 block border border-gray-800 cursor-pointer rounded-md"
12
- > </ input >
13
- </ div >
14
- ) ;
1
+ /* eslint-disable react/prop-types */
2
+ function StrokeWidthPicker ( props ) {
3
+ return (
4
+ < div className = "flex p-1 items-center justify-around mt-4" >
5
+ < h1 className = "font-sans text-lg antialiased font-semibold text-white" >
6
+ Stroke :
7
+ </ h1 >
8
+ < input
9
+ onChange = { props . addLineWidth }
10
+ id = "lineWidth"
11
+ type = "number"
12
+ placeholder = "2"
13
+ defaultValue = { 2 }
14
+ className = "w-12 p-1 h-8 block border border-gray-800 cursor-pointer rounded-md"
15
+ > </ input >
16
+ </ div >
17
+ ) ;
15
18
}
16
19
17
20
export default StrokeWidthPicker ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ function Toolbar(props){
10
10
< ColorPicker name = "Colors :" defaultColor = "#000000" > </ ColorPicker >
11
11
< ColorPicker name = "Canvas :" defaultColor = "#FFFFFF" > </ ColorPicker >
12
12
< Eraser > </ Eraser >
13
- < StrokeWidthPicker > </ StrokeWidthPicker >
13
+ < StrokeWidthPicker addLineWidth = { props . addLineWidth } > </ StrokeWidthPicker >
14
14
< ClearBtn clearOnClick = { props . clearOnClick } id = { props . id } > </ ClearBtn >
15
15
</ div >
16
16
) ;
You can’t perform that action at this time.
0 commit comments