brave-ui icon indicating copy to clipboard operation
brave-ui copied to clipboard

create a text component

Open cezaraugusto opened this issue 7 years ago • 6 comments

default text should be either a div or span with levels defined by the design spec.

if there's a case for labels, for example, this could be accomplished by the .withComponent syntax defined by styled-components

cezaraugusto avatar Aug 29 '18 19:08 cezaraugusto

Hey, I'm new here but could I take this as a first contribution?

ImmanuelSegol avatar Sep 10 '18 18:09 ImmanuelSegol

@cezaraugusto would you be able to share more info? Would be awesome if @ImmanuelSegol could grab this 😄

bsclifton avatar Sep 17 '18 18:09 bsclifton

@cezaraugusto would you be able to share more info? Would be awesome if @ImmanuelSegol could grab this 😄

Would be happy to, I just need some more details.

ImmanuelSegol avatar Sep 17 '18 18:09 ImmanuelSegol

We have decided that we would Like a Text component that:

  • Accepts a size property, which is a string value from '00' to '12'
  • Accepts a type property, which is one of 'display' or 'body'

Both these properties will allow us to ascertain not only the font-family to use, but also the font-size and the line-height.

As part of this work, the TextHeading component should be changed to accept the size property that the Text components props, and in addition a level property, value from 1 to 6 which would be the semantic hierarchy of the heading. It should use the level property for the element type (h{1-6}) and pass the size property to the Text component, as well as the type of 'display'.

Now the problem with this spec is that it's defining the size scale decision in the component render function, instead of purely in the style.ts files. Props if someone can come up with an idea for this that preserves all style decisions in one place - the style.ts files.

Here are the sizes: image

petemill avatar Sep 17 '18 18:09 petemill

Hey!

Is component creation still relevant?

kayun avatar May 04 '21 17:05 kayun

@cezaraugusto @petemill Specify status on request and in general on project. I am interested in the project and would like to contribute. Thank you in advance!

kayun avatar May 14 '21 10:05 kayun