11import React , { useEffect , useState } from 'react' ;
22import Select , { ActionMeta , SingleValue } from 'react-select' ;
3+ import Switch from 'react-switch' ;
34import styled from 'styled-components' ;
45
56const options = [
@@ -78,7 +79,26 @@ export const Console: React.FC<Props> = () => {
7879
7980 return (
8081 < MainContainer >
81- < Title > Select Favorite List Maker</ Title >
82+ < TitleWrapper >
83+ < Title > Select Favorite List Maker</ Title >
84+ < SwitchLabel >
85+ < Switch
86+ checked = { true }
87+ onChange = { ( ) => {
88+ console . log ( 'aaa' ) ;
89+ } }
90+ onColor = "#00b428"
91+ boxShadow = "0px 1px 5px rgba(0, 0, 0, 0.6)"
92+ height = { 16 }
93+ width = { 28 }
94+ handleDiameter = { 18 }
95+ checkedIcon = { false }
96+ uncheckedIcon = { false }
97+ />
98+ < Spacer width = { 6 } />
99+ < span > Indent Coloring</ span >
100+ </ SwitchLabel >
101+ </ TitleWrapper >
82102 < IndentContainer >
83103 { indentOptions . map ( ( indentOption ) => {
84104 const spaceNum = + indentOption . label . replace ( / [ ^ 0 - 9 ] / g, '' ) - 1 ;
@@ -102,7 +122,6 @@ export const Console: React.FC<Props> = () => {
102122 ) ;
103123 } ) }
104124 </ IndentContainer >
105-
106125 < DemonstrationContainer >
107126 < Demonstration >
108127 < Title > Demonstration</ Title >
@@ -134,12 +153,27 @@ const MainContainer = styled.div`
134153 padding-bottom: 8px;
135154` ;
136155
156+ const Spacer = styled . div < { width : number } > `
157+ width: ${ ( props ) => props . width } px;
158+ ` ;
159+
160+ const TitleWrapper = styled . div `
161+ display: flex;
162+ align-items: center;
163+ ` ;
164+
137165const Title = styled . div `
138166 font-size: 16px;
139167 text-align: left;
140168 margin: 12px 10px;
141169` ;
142170
171+ const SwitchLabel = styled . label `
172+ margin-left: 8px;
173+ display: flex;
174+ align-items: center;
175+ ` ;
176+
143177const Label = styled . div `
144178 font-size: 14px;
145179 margin-left: 12px;
0 commit comments