SolidJSS
SolidJSโ€ข4y agoโ€ข
11 replies
KokoNeot

classList not working on icons svg

import { IoCloseOutline } from 'solid-icons/io'

<li class="text-dark flex items-center border-2 rounded-full w-auto">
            <IoCloseOutline classList={{hidden: props.data.empty}} class={`remove-item text-white bg-dark ml-2 rounded-full`} alt="removeItem" onClick={() => props.remove(props.data)} />
            <span class="mx-2">{props.data.name}</span>
        </li>

I had to use ${props.data.empty ? 'hidden' : ''}
any reason why?
Was this page helpful?