[英]How can I change rebass 'Text'(div) component to other semantic element?
文本組件的默認 HTML 元素是 div。 我想將 Text 組件 HTML 元素更改為其他標簽,例如 H1、H2、H3 和 P 以獲取語義。 如何將 rebass Text 組件 HTML 元素更改為其他標簽以實現語義?
Rebass Text 組件具有支持語義的“as”道具。
<Text as="h1">Hello World</Text>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.