naive-ui
naive-ui copied to clipboard
Card: customizable close button
This function solves the problem (这个功能解决的问题)
currently it is not possible to use an other icon or another kind of button as close button. (without overriding header-extra
)
Expected API (期望的 API)
<n-card
:close-button-props="{round: true}",
:render-close-icon="()=>h(NIcon, {}, ()=>h(MyFunnyIcon))">
...
</n-card>
or
<n-card
:close-button-props="{round: true}",
>
<tempalte #closeIcon>
<n-icon><MyFunnyIcon></n-icon>
</template>
</n-card>
same is for dialog
@Sepush #3598 does not fully adress the request. Its still not possible to change close button props like round
👀
@Sepush #3598 does not fully adress the request. Its still not possible to change close button props like
round
👀
I added a close-style
prop for it