Skip to content

How does this work with "styled-components/native"? Do I use "react-native" components? #25

@kentbull

Description

@kentbull

When trying to use a styled.View component like so then I am not sure what the (defstyled ... invocation should be:

React component:

import styled from "styled-components/native"
...
export const AuthContainer = styled.View`
  flex: 1;
  align-items: center;
  justify-content: center;
  align-self: center;
`
(ns myapp.widgets
  (:require ["react-native" :as rn]
            ["styled-components/native$default" :as scn]
            [cljs-styled-components.reagent :refer [defstyled theme-provider clj-props set-default-theme!]]))
            
(defstyled auth-container rn/View
           {:flex 1
            :align-items "center"                           
            :justify-content "center"                       
            :align-self "center"                            
             })

Would this work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions