Skip to content

Props in custom component #95

Answered by csandman
mbagatini asked this question in Q&A
Discussion options

You must be logged in to vote

Ah ok, yeah that took me a while to figure out when I was wrapping the original package. What you probably want to do is something similar to what I'm doing in this file: https://github.com/csandman/chakra-react-select/blob/main/src/select.tsx

import React, { forwardRef } from "react";
import type { MutableRefObject } from "react";
import { Select } from "chakra-react-select";
import type {
  SelectComponent,
  SelectInstance,
  Props,
  GroupBase
} from "chakra-react-select";
// import { chakraStyles } from "../styles/selectChakraStyles";

const CustomSelect = forwardRef(
  <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(
    props: Props<Option, IsMulti, Group>,
    ref

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by csandman
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #81 on May 05, 2022 19:13.