How to extend a styled component created using a recipe ? #2412
Answered
by
anubra266
iamsuneeth
asked this question in
Q&A
-
I have a card component taken from shadow panda import {
card,
} from '@styled-system/recipes';
export const Card = styled('div', card);
I want to extend export const BorderlessCard = styled(Card, {
base: {
border: 'none'
},
}); but met with the following error, which seems appropriate.
Is there anyway in panda to achieve this ? The best I could come up with is below, which I don't think is the right way. export const BorderlessCard = styled('div', card.raw(), {
defaultProps: {
className: css({
border: 'none',
}),
},
}); |
Beta Was this translation helpful? Give feedback.
Answered by
anubra266
Mar 21, 2024
Replies: 1 comment 6 replies
-
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I see @iamsuneeth
How about something like this?
https://play.panda-css.com/UDaOSnS_ag