Question: How to get properties from parent? #2883
Unanswered
RafaelAndeloci
asked this question in
Help
Replies: 2 comments 2 replies
-
Sorry for the long question btw, i wanted to give the most context as possible |
Beta Was this translation helpful? Give feedback.
0 replies
-
+1, I cannot figure out how to do this as well. maybe a dumb suggestion, but did you try cloning the element ie.
and passing along the prop that way? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey Everyone 👋
So, i'm creating a design system using Radix ui primitives and i'm new to the library so sorry if I am being dumb here
So, my intention is to create a variant of size in the select input that by default have only one default variant, so by searching and trying things I extended the
SelectPrimary.Root
and added new things:then in my usage it is working as it should, I can now pass the property of size and invalid to the Select Root:
but then I want to retrieve the value of this property to style the children of the Root (i'm using class variance authority and tailwind to do the styling or the shadcn-ui style-like if you prefer).
i created a abstraction for the sizes variants in my formClass.ts:
then in my index.ts:
So, now i want the SelectTrigger
size
to have the same value of the SelectRootsize
, but i don't know how to do it... can someone pls help me?Beta Was this translation helpful? Give feedback.
All reactions