feat: design applications and first api calls
Co-authored-by: Walid <87608619+WalidKorchi@users.noreply.github.com>
This commit is contained in:
15
components/design/IconButton/IconButton.test.tsx
Normal file
15
components/design/IconButton/IconButton.test.tsx
Normal file
@ -0,0 +1,15 @@
|
||||
import { render } from '@testing-library/react'
|
||||
import { CogIcon } from '@heroicons/react/solid'
|
||||
|
||||
import { IconButton } from './IconButton'
|
||||
|
||||
describe('<IconButton />', () => {
|
||||
it('should render successfully', () => {
|
||||
const { baseElement } = render(
|
||||
<IconButton className='h-10 w-10'>
|
||||
<CogIcon />
|
||||
</IconButton>
|
||||
)
|
||||
expect(baseElement).toBeTruthy()
|
||||
})
|
||||
})
|
20
components/design/IconButton/IconButton.tsx
Normal file
20
components/design/IconButton/IconButton.tsx
Normal file
@ -0,0 +1,20 @@
|
||||
import classNames from 'classnames'
|
||||
|
||||
export interface IconButtonProps
|
||||
extends React.ComponentPropsWithoutRef<'button'> {}
|
||||
|
||||
export const IconButton: React.FC<IconButtonProps> = (props) => {
|
||||
const { children, className, ...rest } = props
|
||||
|
||||
return (
|
||||
<button
|
||||
className={classNames(
|
||||
'text-center flex items-center justify-center text-green-800 dark:text-green-400 focus:outline-none focus:animate-pulse hover:animate-pulse',
|
||||
className
|
||||
)}
|
||||
{...rest}
|
||||
>
|
||||
{children}
|
||||
</button>
|
||||
)
|
||||
}
|
1
components/design/IconButton/index.ts
Normal file
1
components/design/IconButton/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './IconButton'
|
Reference in New Issue
Block a user