Skip to content

style(component): Updating CodeLine component to use Styled-components#561

Merged
alejandronanez merged 3 commits intogitpoint:masterfrom
josenaranjo:refactor-515-code-line-component-styled
Oct 23, 2017
Merged

style(component): Updating CodeLine component to use Styled-components#561
alejandronanez merged 3 commits intogitpoint:masterfrom
josenaranjo:refactor-515-code-line-component-styled

Conversation

@josenaranjo
Copy link
Copy Markdown
Contributor

@josenaranjo josenaranjo commented Oct 23, 2017

Deleting StyledSheet styles and migrating those to Styled-Components format.

Closes #515

Deleted StyledSheet styles and migrate those to Styled-Components format.

515
Copy link
Copy Markdown
Member

@alejandronanez alejandronanez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Address the typo and this should be good to go.

Thanks!

Comment thread src/components/code-line.component.js Outdated
`;

const Wrapper = styled.View`
flex-directino: row;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you fix this typo please, it should be flex-direction

<SyntaxHighlighterStyled
language={language}
style={GithubStyle}
CodeTag={Text}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're going to need to keep Text imported for this line.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Fixing property typo.
Adding missing component text from react-native
Copy link
Copy Markdown
Member

@alejandronanez alejandronanez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

@chinesedfan chinesedfan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alejandronanez Glad to see more and more contributors for styled components refactoring. But we didn't pay enough attentions for shorthands properties problem. Maybe we need mention this at #532.

const CodeLineStyled = styled.Text`
font-family: ${styledFonts.fontCode}
font-size: ${normalize(11)}
padding: 3 10;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@josenaranjo Have you ever tested about this kind of shorthands properties? As far as I know, it will cause a crash. [Link]

const LineNumbers = styled.View`
width: 80;
padding-left: 10;
padding: 3;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants