mirror of
https://github.com/hazemKrimi/personal-website.git
synced 2026-05-01 18:00:26 +00:00
Add icon button component
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import { FC } from 'react';
|
||||
import styled from 'styled-components';
|
||||
import Image from 'next/image';
|
||||
|
||||
const Btn = styled.button`
|
||||
display: inline;
|
||||
cursor: pointer;
|
||||
background: none;
|
||||
border: none;
|
||||
color: none;
|
||||
outline: none;
|
||||
`;
|
||||
|
||||
export interface Props {
|
||||
icon: string;
|
||||
onClick?: () => void;
|
||||
}
|
||||
|
||||
const IconButton: FC<Props> = ({ icon, onClick }) => {
|
||||
return (
|
||||
<Btn onClick={onClick}>
|
||||
<Image src={icon} alt='Icon Button' width={24} height={24} />
|
||||
</Btn>
|
||||
);
|
||||
};
|
||||
|
||||
export default IconButton;
|
||||
Reference in New Issue
Block a user