Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Text 组件的默认 HTML 元素是 div。我想将 Text 组件 HTML 元素更改为其他标签,例如 H1、H2、H3 和 P 以获取语义。如何将 rebass Text 组件 HTML 元素更改为其他标签以实现语义?
Rebass Text 组件具有支持语义的“as”道具。
<Text as="h1">Hello World</Text>