mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* selected state for Button * tests * fix menu filter button hover issue * update screenshots * try to fix SearchBar recent keywords test
34 lines
723 B
TypeScript
34 lines
723 B
TypeScript
import { Button } from '@chakra-ui/react';
|
|
import React from 'react';
|
|
|
|
import IconSvg from 'ui/shared/IconSvg';
|
|
|
|
interface Props {
|
|
onClick: () => void;
|
|
isActive: boolean;
|
|
}
|
|
|
|
const TriggerButton = ({ onClick, isActive }: Props, ref: React.ForwardedRef<HTMLButtonElement>) => {
|
|
return (
|
|
<Button
|
|
ref={ ref }
|
|
size="sm"
|
|
variant="outline"
|
|
colorScheme="gray"
|
|
onClick={ onClick }
|
|
isActive={ isActive }
|
|
aria-label="Show project info"
|
|
fontWeight={ 500 }
|
|
lineHeight={ 6 }
|
|
pl={ 1 }
|
|
pr={ 2 }
|
|
h="32px"
|
|
>
|
|
<IconSvg name="info" boxSize={ 6 } mr={ 1 }/>
|
|
<span>Info</span>
|
|
</Button>
|
|
);
|
|
};
|
|
|
|
export default React.forwardRef(TriggerButton);
|