From 8c7d25981f93d01bb0887cc6850cf27248c2db9f Mon Sep 17 00:00:00 2001 From: Ivan Gabriele Date: Fri, 27 Sep 2024 07:49:17 +0200 Subject: [PATCH] fix(elements): add missing default className to LinkButton --- src/elements/LinkButton.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/elements/LinkButton.tsx b/src/elements/LinkButton.tsx index 1fd221b88..7bc0e495f 100644 --- a/src/elements/LinkButton.tsx +++ b/src/elements/LinkButton.tsx @@ -1,9 +1,10 @@ +import { Size } from '@constants' import { type IconProps } from '@types_/definitions' +import classnames from 'classnames' import { isString } from 'lodash' import { type ButtonHTMLAttributes, type FunctionComponent, type ReactNode } from 'react' import styled from 'styled-components' -import { Size } from '../constants' import { THEME } from '../theme' export type LinkButtonProps = ButtonHTMLAttributes & { @@ -11,9 +12,11 @@ export type LinkButtonProps = ButtonHTMLAttributes & { children?: string | ReactNode | undefined size?: Size | undefined } -export function LinkButton({ children, Icon, size = Size.NORMAL, ...props }: Readonly) { +export function LinkButton({ children, className, Icon, size = Size.NORMAL, ...props }: Readonly) { + const controlledClassName = classnames('Element-LinkButton', className) + return ( - + <> {Icon && } {isString(children) ?

{children}

: <>{children}}