Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create a text component #118

Open
cezaraugusto opened this issue Aug 29, 2018 · 4 comments
Open

create a text component #118

cezaraugusto opened this issue Aug 29, 2018 · 4 comments

Comments

@cezaraugusto
Copy link
Member

@cezaraugusto cezaraugusto commented Aug 29, 2018

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

@ImmanuelSegol
Copy link

@ImmanuelSegol ImmanuelSegol commented Sep 10, 2018

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

@bsclifton
Copy link
Member

@bsclifton bsclifton commented Sep 17, 2018

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

@ImmanuelSegol
Copy link

@ImmanuelSegol ImmanuelSegol commented Sep 17, 2018

@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.

@petemill
Copy link
Member

@petemill petemill commented Sep 17, 2018

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

@rossmoody rossmoody moved this from To do to On-deck in Component Building Blocks Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.