admin管理员组文章数量:1359202
What I expect:
What actually shows:
The size is not the same as my expectation.
App.js
import "./styles.css";
import { HStack, PinInput, PinInputField } from "@chakra-ui/react";
export default function App() {
return (
<div className="App">
<HStack>
<PinInput type="alphanumeric">
<PinInputField />
<PinInputField />
<PinInputField />
<PinInputField />
</PinInput>
</HStack>
</div>
);
}
Codesandbox:
=/src/App.js
What I expect:
What actually shows:
The size is not the same as my expectation.
App.js
import "./styles.css";
import { HStack, PinInput, PinInputField } from "@chakra-ui/react";
export default function App() {
return (
<div className="App">
<HStack>
<PinInput type="alphanumeric">
<PinInputField />
<PinInputField />
<PinInputField />
<PinInputField />
</PinInput>
</HStack>
</div>
);
}
Codesandbox:
https://codesandbox.io/s/romantic-snowflake-km87e?file=/src/App.js
1 Answer
Reset to default 7It seems that you have forgotten the provider setup. Please make sure to read the setup in the documentation.
You should have the following code surrouding the App ponent, helping you fix the problem.
import { ChakraProvider } from '@chakra-ui/react'
<ChakraProvider>
<App />
</ChakraProvider>
本文标签: javascriptchakra uithe style does not applyStack Overflow
版权声明:本文标题:javascript - chakra ui - the style does not apply - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744081878a2587793.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论