mars-v2-frontend/src/components/Button/utils.tsx
Yusuf Seyrek ee20c2fde2
feat: finalize button component with tests (#224)
* feat: finalize button component with tests

* fix: import

* fix: import
2023-05-24 16:07:08 +03:00

23 lines
581 B
TypeScript

import classNames from 'classnames'
export function glowElement(enableAnimations: boolean) {
return (
<svg
className={classNames(
enableAnimations && 'group-hover:animate-glow group-focus:animate-glow',
'glow-container isolate opacity-0',
'pointer-events-none absolute inset-0 h-full w-full',
)}
>
<rect
pathLength='100'
strokeLinecap='round'
width='100%'
height='100%'
rx='4'
className='absolute glow-line group-hover:glow-hover group-focus:glow-hover'
/>
</svg>
)
}