Skip to content

Commit

Permalink
build: esnext (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
duguyihou authored Jun 29, 2023
1 parent c69f3ad commit 9080167
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 10 deletions.
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"test": "jest"
},
"dependencies": {
"neostyle": "^0.1.5",
"neostyle": "^0.1.6",
"react": "18.2.0",
"react-native": "0.72.0"
},
Expand Down
8 changes: 4 additions & 4 deletions example/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 16 additions & 3 deletions example/src/common/NeoView.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
import {View, StyleProp, ViewStyle} from 'react-native';
import React, {PropsWithChildren} from 'react';
import {bg, BgProps, compose, layout, LayoutProps, useStyle} from 'neostyle';
import {
bg,
BgProps,
border,
BorderProps,
compose,
layout,
LayoutProps,
spacing,
SpacingProps,
useStyle,
} from 'neostyle';
import {Theme} from '../theme';

type StyleProps = {
style?: StyleProp<ViewStyle>;
} & BgProps<Theme> &
LayoutProps<Theme>;
LayoutProps<Theme> &
SpacingProps<Theme> &
BorderProps<Theme>;

const styleParser = compose<Theme, StyleProps>([bg, layout]);
const styleParser = compose<Theme, StyleProps>([bg, layout, spacing, border]);

type Props = PropsWithChildren<StyleProps>;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "neostyle",
"version": "0.1.6",
"version": "0.1.7",
"description": "a small tool to write styles for react native",
"author": "duguyihou",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"esModuleInterop": true,
"isolatedModules": false,
"jsx": "react",
"lib": ["es6", "es2015", "es2016", "es2017", "es2018", "ES2019"],
"lib": ["es6", "ES7", "ESNext"],
"noUnusedParameters": true,
"declaration": true,
"noUnusedLocals": true,
Expand Down

0 comments on commit 9080167

Please sign in to comment.