如何将尾风CSS用于Navbar和循环中显示的项目
<div >
{categories?.data &&
categories.data.map((category) => (
<div key={category.id} onClick={ () => handleClick(category.id)} >
{category.name}
</div>
这是我的代码,需要在Navbar中查看类别
<div >
{categories?.data &&
categories.data.map((category) => (
<div key={category.id} onClick={ () => handleClick(category.id)} >
{category.name}
</div>
this is my code and needs to look category in the navbar
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
简单地,您将标签的标签切换为标签,以及Navbar上的尾风类的工作。从
此外,您需要返回要显示的JSX。请参阅下面的样本。
Simple you switch out the tag for a tag, and the work with the tailwind classes on the navbar. Sample from the docs below.
Furthermore you need to return the jsx you want to display. See the sample below.
这应该起作用!
This should work!