timelessco / chakra-components

Components built on top of Chakra UI
MIT License
1 stars 0 forks source link

[RFC] Text Component #5

Closed SamrithaS closed 4 years ago

SamrithaS commented 4 years ago

Introduction Text is used to render text and paragraphs within an interface. Text is derived fromBoxcomponent as a paragraph <p> and it can take all styles that Box does

Props

prasanna1211 commented 4 years ago

as per chakra, Text is a dependency of box and rendered as p tag. Read this

SamrithaS commented 4 years ago

@prasanna1211 okay read it, Is there any change that I should impose in this RFC?

prasanna1211 commented 4 years ago

No. Box component becomes a dependency for this. So lets wrap Box, then Text then Button.

navin-moorthy commented 4 years ago

Is Button built on top of Box and Text? Why can't this be a separate one? In chakra it is built on top of PseudoBox.

prasanna1211 commented 4 years ago

Primarily to commonize props. So any component that uses box will have same prop definitions throughout. They have Box as lower level primitive. Box has 'as' props which gives flexiblity to render it as anything.

prasanna1211 commented 4 years ago

But for us we are going to use their Text component. We just need to wait till box is completed. After which we can use their text (understand their code first) to create our own.

navin-moorthy commented 4 years ago

Okay, this means we should wait until Box component is built for use.

prasanna1211 commented 4 years ago

Yes.

prasanna1211 commented 4 years ago

Closing this as it is merged