Skip to content

Feature: Add Components with styles attribute #8

@agustito37

Description

@agustito37

Feature Requests

Checklist

  • My feature request is specific to @rootstrap/react-native-use-styles.

  • I've searched open issues to make sure I'm not opening a duplicate feature request

Description

It would be awesome having custom components that internally uses the useStyles hook. This is a proof of concept, we need a draft for this.

import namespace from './my-namespaced-styles';
const { Text } = namespace;

const component = () ⇒ {
  return (
    <Text styles=".global-style .local-style ">
      Hello World!
    </Text>
  );
}

In this case, the custom Text component is a wrapper of the React Native's Text component and this wrap is using the library to transform the styles prop to its respective styles.

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