In the Icon component changed props.className to props.class

This commit is contained in:
kvakazyambra 2022-09-29 22:37:49 +03:00
parent 78e351e71b
commit eeeb8f2271

View File

@ -4,7 +4,7 @@ import type { JSX } from 'solid-js'
import './Icon.css'
type IconProps = {
className?: string
class?: string
iconClassName?: string
style?: string | JSX.CSSProperties
title?: string
@ -16,7 +16,7 @@ export const Icon = (passedProps: IconProps) => {
const props = mergeProps({ title: '', counter: 0 }, passedProps)
return (
<div class={clsx('icon', props.className)} style={props.style}>
<div class={clsx('icon', props.class)} style={props.style}>
<img src={`/icons/${props.name}.svg`} alt={props.title ?? props.name} class={props.iconClassName} />
<Show when={props.counter}>
<div class="notifications-counter">{props.counter}</div>