0.9.3 • Published 8 months ago

@morfeo/native v0.9.3

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

@morfeo/native

Morfeo logo

morfeo is a framework-agnostic set of tools that will help you to build your next design system based on a single source of truth: the theme.


Documentation | API | Contributing | Discord


@morfeo/native package is brings to React Native the morfeo's eco system

Installation

with npm:

npm install @morfeo/native

or yarn:

yarn add @morfeo/native

Usage

Just like @morfeo/react, the API of this package is the same as @morfeo/hooks, the main differences between @morfeo/react and @morfeo/native are related to how the parsers converts style objects to valid style for React Native, for example in @morfeo/native there you cannot use any pseudo element/class and shadows output is different (shadowOffset, shadowColor, shadowOpacity and shadowRadius instead of boxShadow)

import { View, ViewProps } from 'react-native';
import { useStyle, Style } from '@morfeo/native';

type Props = Omit<ViewProps, 'style'> & {
  style?: Style;
};

const CustomView: React.FC<Props> = ({ ...props, style }) => {
  const parsedStyle = useStyle(style);
  return <View {...props} style={parsedStyle} />;
};

const App = () => {
  return (
    <CustomView
      style={{
        bg: 'primary',
        px: 'm',
        corner: 's',
        shadow: 'strong',
      }}
    />
  );
};
0.9.3

8 months ago

0.9.0

1 year ago

0.9.2

1 year ago

0.9.1

1 year ago

0.8.0

1 year ago

0.7.0

2 years ago

0.6.0

2 years ago

0.5.1

2 years ago

0.5.0

2 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.4.2

3 years ago

0.3.0

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.2.0

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago