Skip to content

Styled #9

@ssomnoremac

Description

@ssomnoremac

I've added an implementation of Styled Components for this library. Use regular object styles.

Needs to be tested but the idea is

import { Styled } from react-native-row

const GreenRow = Styled.Row({
    backgroundColor: "green"
})

<GreenRow dial={5} flex>
    <Text>Hi</Text>
</GreenRow>

Best of both worlds? My problem with Styles Components is that dial, or layout should be defined on the component instance itself. Layout is only visually relevant in relation to its context. So by putting layout styles in Styled definitions, you lose that context. Colors and other styles however, I'm fine to extract away. So this might get it done for some people. We'll see.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions