我正在使用 chakra ui,我想将抽屉组件的宽度设置为370px。我想将抽屉组件的宽度设置为370px。如果我传递smorlg作为尺寸,它会将尺寸更改为默认设置,但我无法将其更改为我想要的尺寸。
https://chakra-ui.com/docs/overlay/drawer
<Drawer
isOpen={isOpen}
placement="right"
onClose={onClose}
finalFocusRef={btnRef}
size="lg"
>
Run Code Online (Sandbox Code Playgroud) 我正在使用 React 和 Chakra UI
我希望图标和文本并排。
图标显示不对齐。
<HStack alignItems="center" gridGap="8px">
<UsersIcon />
<Text fontSize="sm">Text</Text>
</HStack>
Run Code Online (Sandbox Code Playgroud)
export const UsersIcon: FunctionComponent<Props> = ({ ...props }) => (
<Icon {...props} fontSize={'24px'} verticalAlign="center">
<path
fillRule="evenodd"
clipRule="evenodd"
d="M10.667 7.33301C11.7737 7.33301 12.6603 6.43967 12.6603 5.33301C12.6603 4.22634 11.7737 3.33301 10.667 3.33301C9.56032 3.33301 8.66699 4.22634 8.66699 5.33301C8.66699 6.43967 9.56032 7.33301 10.667 7.33301ZM5.33366 7.33301C6.44033 7.33301 7.32699 6.43967 7.32699 5.33301C7.32699 4.22634 6.44033 3.33301 5.33366 3.33301C4.22699 3.33301 3.33366 4.22634 3.33366 5.33301C3.33366 6.43967 4.22699 7.33301 5.33366 7.33301ZM5.33366 8.66634C3.78033 8.66634 0.666992 9.44634 0.666992 …Run Code Online (Sandbox Code Playgroud)