Skip to content

Commit

Permalink
fix: border type issue (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
duguyihou authored Jun 30, 2023
1 parent 9080167 commit 6f0853a
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 11 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.6",
"neostyle": "^0.1.7",
"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.

5 changes: 5 additions & 0 deletions example/src/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@ const Home = () => {
bg={{sm: 'primaryBg', md: 'secondaryBg', lg: 'tertiaryBg'}}
width={{sm: 100, md: 150, lg: 200}}
height={{sm: 100, md: 150, lg: 200}}
padding={{sm: 's1', md: 's2', lg: 's3'}}
/>
<NeoView
bg={{sm: 'secondaryBg', md: 'tertiaryBg', lg: 'primaryBg'}}
width={{sm: 100, md: 150, lg: 200}}
height={{sm: 100, md: 150, lg: 200}}
margin={{sm: 's1', md: 's2', lg: 's3'}}
borderRadius={{sm: 'b1', md: 'b2', lg: 'b3'}}
borderColor={{sm: 'primaryBg', md: 'secondaryBg', lg: 'tertiaryBg'}}
borderWidth={{sm: 1, md: 2, lg: 4}}
/>
<NeoView
bg={{sm: 'tertiaryBg', md: 'primaryBg', lg: 'secondaryBg'}}
Expand Down
10 changes: 10 additions & 0 deletions example/src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ const theme = createTheme({
lg: 768,
xl: 1024,
},
spacing: {
s1: 4,
s2: 8,
s3: 12,
},
borderRadii: {
b1: 10,
b2: 20,
b3: 30,
},
});

export type Theme = typeof theme;
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.7",
"version": "0.1.8",
"description": "a small tool to write styles for react native",
"author": "duguyihou",
"main": "dist/index.js",
Expand Down
17 changes: 12 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,25 @@
"esModuleInterop": true,
"isolatedModules": false,
"jsx": "react",
"lib": ["es6", "ES7", "ESNext"],
"lib": ["ES6","ES2015", "ES2016", "ES2017", "ES2018", "ES2019"],
"noUnusedParameters": true,
"declaration": true,
"noUnusedLocals": true,
"moduleResolution": "node",
"strict": true,
"target": "es5",
"target": "ES5",
"skipLibCheck": true,
"outDir": "./dist",
"baseUrl": "./src",
"rootDir": "./src",
"rootDir": "./src"
},
"include": ["./src/**/*.ts", "./src/**/*.tsx"],
"exclude": ["node_modules", "**/*.test.ts", "**/*.test.tsx"]
}
"exclude": [
"node_modules",
"babel.config.js",
"metro.config.js",
"jest.config.js",
"**/*.test.ts",
"**/*.test.tsx"
]
}

0 comments on commit 6f0853a

Please sign in to comment.