diff options
| author | MetaCubeX <[email protected]> | 2022-11-03 12:09:10 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-11-03 12:09:10 +0800 |
| commit | 908a2c5251d2bf236df97e2c79b27f699b5b6d39 (patch) | |
| tree | e3fae28002c198779bc2b8255ae01ee69edb2be9 /src/components/shared | |
| parent | 89e8f0c6a3a7399e05a5934c3fdabcbe0b96d5ae (diff) | |
| parent | bb5eff27eba3f40ecf43f0f72b19802cc0b5c311 (diff) | |
Merge pull request #5 from kaniwow/master
fix and feat
Diffstat (limited to 'src/components/shared')
| -rw-r--r-- | src/components/shared/Fab.tsx | 14 | ||||
| -rw-r--r-- | src/components/shared/TextFitler.tsx | 2 | ||||
| -rw-r--r-- | src/components/shared/ThemeSwitcher.tsx | 94 |
3 files changed, 55 insertions, 55 deletions
diff --git a/src/components/shared/Fab.tsx b/src/components/shared/Fab.tsx index 832306e..d3a62e1 100644 --- a/src/components/shared/Fab.tsx +++ b/src/components/shared/Fab.tsx @@ -23,7 +23,7 @@ interface ABProps extends React.HTMLAttributes<HTMLButtonElement> { } const AB: React.FC<ABProps> = ({ children, ...p }) => ( - <button type="button" {...p} className="rtf--ab"> + <button type='button' {...p} className='rtf--ab'> {children} </button> ); @@ -34,7 +34,7 @@ interface MBProps } export const MB: React.FC<MBProps> = ({ children, ...p }) => ( - <button type="button" className="rtf--mb" {...p}> + <button type='button' className='rtf--mb' {...p}> {children} </button> ); @@ -124,17 +124,17 @@ const Fab: React.FC<FabProps> = ({ onMouseEnter={enter} onMouseLeave={leave} className={`rtf ${isOpen ? 'open' : 'closed'}`} - data-testid="fab" + data-testid='fab' style={style} {...p} > - <li className="rtf--mb__c"> + <li className='rtf--mb__c'> <MB onClick={toggle} style={mainButtonStyles} - data-testid="main-button" - role="button" - aria-label="Floating menu" + data-testid='main-button' + role='button' + aria-label='Floating menu' tabIndex={0} > {icon} diff --git a/src/components/shared/TextFitler.tsx b/src/components/shared/TextFitler.tsx index e4a4a88..f790340 100644 --- a/src/components/shared/TextFitler.tsx +++ b/src/components/shared/TextFitler.tsx @@ -12,7 +12,7 @@ export function TextFilter(props: { return ( <input className={s.input} - type="text" + type='text' value={text} onChange={onChange} placeholder={props.placeholder} diff --git a/src/components/shared/ThemeSwitcher.tsx b/src/components/shared/ThemeSwitcher.tsx index 45b60bc..abc89ef 100644 --- a/src/components/shared/ThemeSwitcher.tsx +++ b/src/components/shared/ThemeSwitcher.tsx @@ -35,9 +35,9 @@ export function ThemeSwitcherImpl({ theme, dispatch }) { <div className={s.themeSwitchContainer}> <span className={s.iconWrapper}>{themeIcon}</span> <select onChange={onChange}> - <option value="auto">Auto</option> - <option value="dark">Dark</option> - <option value="light">Light</option> + <option value='auto'>Auto</option> + <option value='dark'>Dark</option> + <option value='light'>Light</option> </select> </div> </Tooltip> @@ -49,18 +49,18 @@ function MoonA() { const motion = module.motion; return ( <svg - xmlns="http://www.w3.org/2000/svg" - width="20" - height="20" - viewBox="0 0 24 24" - fill="none" - stroke="currentColor" - strokeWidth="2" - strokeLinecap="round" - strokeLinejoin="round" + xmlns='http://www.w3.org/2000/svg' + width='20' + height='20' + viewBox='0 0 24 24' + fill='none' + stroke='currentColor' + strokeWidth='2' + strokeLinecap='round' + strokeLinejoin='round' > <motion.path - d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" + d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z' initial={{ rotate: -30 }} animate={{ rotate: 0 }} transition={{ duration: 0.7 }} @@ -75,26 +75,26 @@ function Sun() { return ( <svg - xmlns="http://www.w3.org/2000/svg" - width="20" - height="20" - viewBox="0 0 24 24" - fill="none" - stroke="currentColor" - strokeWidth="2" - strokeLinecap="round" - strokeLinejoin="round" + xmlns='http://www.w3.org/2000/svg' + width='20' + height='20' + viewBox='0 0 24 24' + fill='none' + stroke='currentColor' + strokeWidth='2' + strokeLinecap='round' + strokeLinejoin='round' > - <circle cx="12" cy="12" r="5"></circle> + <circle cx='12' cy='12' r='5'></circle> <motion.g initial={{ scale: 0.7 }} animate={{ scale: 1 }} transition={{ duration: 0.5 }}> - <line x1="12" y1="1" x2="12" y2="3"></line> - <line x1="12" y1="21" x2="12" y2="23"></line> - <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line> - <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line> - <line x1="1" y1="12" x2="3" y2="12"></line> - <line x1="21" y1="12" x2="23" y2="12"></line> - <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line> - <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line> + <line x1='12' y1='1' x2='12' y2='3'></line> + <line x1='12' y1='21' x2='12' y2='23'></line> + <line x1='4.22' y1='4.22' x2='5.64' y2='5.64'></line> + <line x1='18.36' y1='18.36' x2='19.78' y2='19.78'></line> + <line x1='1' y1='12' x2='3' y2='12'></line> + <line x1='21' y1='12' x2='23' y2='12'></line> + <line x1='4.22' y1='19.78' x2='5.64' y2='18.36'></line> + <line x1='18.36' y1='5.64' x2='19.78' y2='4.22'></line> </motion.g> </svg> ); @@ -106,29 +106,29 @@ function Auto() { return ( <svg - xmlns="http://www.w3.org/2000/svg" - width="20" - height="20" - viewBox="0 0 24 24" - fill="none" - stroke="currentColor" - strokeWidth="2" - strokeLinecap="round" - strokeLinejoin="round" + xmlns='http://www.w3.org/2000/svg' + width='20' + height='20' + viewBox='0 0 24 24' + fill='none' + stroke='currentColor' + strokeWidth='2' + strokeLinecap='round' + strokeLinejoin='round' > - <circle cx="12" cy="12" r="11" /> - <clipPath id="cut-off-bottom"> + <circle cx='12' cy='12' r='11' /> + <clipPath id='cut-off-bottom'> <motion.rect - x="12" - y="0" - width="12" - height="24" + x='12' + y='0' + width='12' + height='24' initial={{ rotate: -30 }} animate={{ rotate: 0 }} transition={{ duration: 0.7 }} /> </clipPath> - <circle cx="12" cy="12" r="6" clipPath="url(#cut-off-bottom)" fill="currentColor" /> + <circle cx='12' cy='12' r='6' clipPath='url(#cut-off-bottom)' fill='currentColor' /> </svg> ); } |
