Size Prop

Loading "Size Prop"
πŸ‘¨β€πŸ’Ό It's great that we're composing the classNames and styles properly, but wouldn't it be better if the users of our components didn't have to worry about which class name to apply for a given effect? Or that a class name is involved at all? I think it would be better if users of our component had a size prop and our component took care of making the box that size.
In this step, try to make this API work:
<Box size="small" style={{ backgroundColor: 'lightblue' }}>
	small lightblue box
</Box>
Login to get access to the exclusive discord channel.
  • βš›οΈFundamentals
    First Four Exercises are Free!
    Kent C. Dodds β—† πŸš€πŸ†πŸŒŒ:
    To make sure this shows up in the fundamentals thread. Isn't it exciting the first four exercises of...
    1 Β· 4 days ago
  • General
    Welcome to EpicReact.dev! Say Hello πŸ‘‹
    Kent C. Dodds β—† πŸš€πŸ†πŸŒŒ:
    Welcome to the first of many posts in the EpicReact.dev channel! Take a moment to introduce yourself...
    0 Β· 4 days ago