Merge pull request 'Fixed button component' (#103) from fix/button-component into develop

Reviewed-on: http://85.143.176.51:3000/free-land/front-end/pulls/103
This commit is contained in:
Denis Gorbunov 2022-08-23 10:41:37 +00:00
commit 27a769277e

View File

@ -38,9 +38,6 @@ export const Button: React.FC<ButtonProps> & ButtonExtentions = ({
children,
...props
}) => {
console.log(
React.isValidElement(children) && React.Children.only(children).type
);
const isOnlyIcon =
children &&
React.isValidElement(children) &&
@ -51,11 +48,11 @@ export const Button: React.FC<ButtonProps> & ButtonExtentions = ({
return (
<button
//TODO change on click event
onClick={!disabled ? () => alert("Click") : undefined}
onClick={!disabled ? () => {} : undefined}
className={classNames([
"flex content-center justify-between",
"text-center",
{ padding: defaultStyle },
padding,
"rounded",
{
"!cursor-default": disabled,