Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Just like any other component. And you can see examples of using props in the documentation .
UPD. I looked at the code - so you have already done part of the work. Some of the components already accept props - Container, for example, or Wrapper. Let's take Wrapper - it has itemWidth and itemHeight. Well, great:
Say, do you need a default value? Well, let it be instead , for example. Or you can rewrite the component like this:
export const Wrapper = styled.article(({
itemWidth,
itemHeight = '200px',
}) => ({
backgroundColor: '#efefef',
margin: '5px',
height: itemHeight,
width: itemWidth,
}));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question