Commit 5248cb46 authored by tom's avatar tom

change clear input button

parent 20bf686c
import { chakra, Icon, IconButton, useColorModeValue } from '@chakra-ui/react'; import { chakra, Icon, IconButton, useColorModeValue } from '@chakra-ui/react';
import React from 'react'; import React from 'react';
import crossIcon from 'icons/cross.svg'; import errorIcon from 'icons/status/error.svg';
interface Props { interface Props {
onClick: () => void; onClick: () => void;
...@@ -9,16 +9,17 @@ interface Props { ...@@ -9,16 +9,17 @@ interface Props {
} }
const InputClearButton = ({ onClick, className }: Props) => { const InputClearButton = ({ onClick, className }: Props) => {
const iconColor = useColorModeValue('blackAlpha.600', 'whiteAlpha.600'); const iconColor = useColorModeValue('gray.300', 'gray.600');
const iconColorHover = useColorModeValue('gray.200', 'gray.500');
return ( return (
<IconButton <IconButton
className={ className } className={ className }
colorScheme="gray" colorScheme="none"
aria-label="Clear input" aria-label="Clear input"
title="Clear input" title="Clear input"
boxSize={ 6 } boxSize={ 6 }
icon={ <Icon as={ crossIcon } boxSize={ 4 } color={ iconColor } focusable={ false }/> } icon={ <Icon as={ errorIcon } boxSize={ 3 } color={ iconColor } focusable={ false } _hover={{ color: iconColorHover }}/> }
size="sm" size="sm"
onClick={ onClick } onClick={ onClick }
/> />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment