mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-24 05:17:11 +02:00
First public commit
This commit is contained in:
commit
e05cd62e53
228 changed files with 17717 additions and 0 deletions
28
components/compact-button.tsx
Normal file
28
components/compact-button.tsx
Normal file
|
@ -0,0 +1,28 @@
|
|||
import * as React from "react";
|
||||
|
||||
export interface CompactButtonProps {
|
||||
icon?: React.ComponentType<{
|
||||
className?: string;
|
||||
style?: React.CSSProperties;
|
||||
}>;
|
||||
children?: React.ReactNode;
|
||||
onClick?: () => void;
|
||||
}
|
||||
|
||||
const CompactButton: React.VoidFunctionComponent<CompactButtonProps> = ({
|
||||
icon: Icon,
|
||||
children,
|
||||
onClick,
|
||||
}) => {
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
className="h-5 w-5 rounded-full hover:bg-gray-200 transition-colors active:text-gray-500 active:bg-gray-300 text-gray-400 bg-gray-100 inline-flex items-center justify-center"
|
||||
onClick={onClick}
|
||||
>
|
||||
{Icon ? <Icon className="w-3 h-3" /> : children}
|
||||
</button>
|
||||
);
|
||||
};
|
||||
|
||||
export default CompactButton;
|
Loading…
Add table
Add a link
Reference in a new issue