Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

242
Visualizações
Radix UI Typescript Typings

Using radix-ui to make reusable components in typescript and react (bit of a typescript novice). The API documentation includes different props that can be used in the component but they are broken into sections (ex: Root, Trigger, Content, https://www.radix-ui.com/docs/primitives/components/dropdown-menu). I would like to extend the props from the component so i could use the 'open' prop from Root and 'onSelect' from Item but this code

import * as RadixDropdownMenu from "@radix-ui/react-dropdown-menu"

export interface DropdownMenuItemProps extends RadixDropdownMenu.DropdownMenuProps {
   
}

only lets me pull props from the root props; I cant access the onSelect prop.

this example code gives me access to the 'onSelect' prop.

export interface DropdownMenuItemProps extends RadixDropdownMenu.MenuItemProps {
   
}

There isnt one single 'Parent Props' that can be extended. Feel like if you are using a library a single extension import should give you access to all of them? Or is there a way to combine the two extensions that im missing? Looking for a way to get access to all the props available on the component.

Thanks in advance.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda