【发布时间】:2021-07-09 08:54:13
【问题描述】:
我正在尝试将按钮内容和图标对齐在同一行
<button key={index}
className="focus:outline-none font-sans bg-white border border-gray-300 hover:bg-gray-100 text-left text-gray-700 px-2 py-2 rounded"
onClick = {(e) =>
{
e.preventDefault();
window.open(element.url,"_blank")
} }
>
<span className="px-1">{element.title}</span>
<Icon className="text-gray-700 float-right" name={topic.icon } />
</button>
请检查渲染
【问题讨论】:
标签: reactjs jsx tailwind-css