I am working on a search component in Chakra UI. How are you supposed to fit two IconButtons inside of a single InputRightElement in an InputGroup? The second IconButton goes outside of the Input field.
<InputGroup size="lg" shadow={"md"} borderRadius={"80px"}>
<Input
ref={searchInputRef}
type="text"
borderRadius={"80px"}
placeholder="Search"
defaultValue={router.query.searchInput}
/>
<InputRightElement>
<IconButton
icon={<GrFormClose />}
onClick={() => (searchInputRef.current.value = "")}
>
</IconButton>
<IconButton
onClick={() => {} }
colorScheme="gray"
aria-label="Search"
isRound="true"
icon={<Search2Icon />}
size={"sm"}
></IconButton>
</InputRightElement>
</InputGroup>
I attached an image of what it looks like:
Thank you!
Via Active questions tagged javascript - Stack Overflow https://ift.tt/p1DRAJs
Comments
Post a Comment