Skip to content

Commit

Permalink
Merge pull request #4497 from GeekyAnts/release/3.3.1-alpha.1
Browse files Browse the repository at this point in the history
release 3.3.1-alpha.1
  • Loading branch information
surajahmed authored Jan 6, 2022
2 parents 9d1618e + db48cb6 commit b4ed987
Show file tree
Hide file tree
Showing 39 changed files with 10,359 additions and 135 deletions.
15 changes: 9 additions & 6 deletions example/storybook/stories/components/primitives/HStack/basic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@ import { HStack, Stack, Center, Heading } from 'native-base';

export function Example() {
return (
<Stack space={3} alignItems="center">
<Heading textAlign="center" mb="10">
HStack
</Heading>
<HStack space={3} alignItems="center">
<Stack
space={[20, 40, 80]}
direction={['row', 'column', 'row-reverse']}
alignItems="center"
>
<Heading textAlign="center">HStack</Heading>
<Heading textAlign="center">HStack1</Heading>
{/* <HStack space={3} alignItems="center">
<Center h="40" w="20" bg="primary.500" rounded="md" shadow={3} />
<Center h="40" w="20" bg="secondary.500" rounded="md" shadow={3} />
<Center h="40" w="20" bg="emerald.500" rounded="md" shadow={3} />
</HStack>
</HStack> */}
</Stack>
);
}
13 changes: 9 additions & 4 deletions example/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@
"compilerOptions": {
"baseUrl": ".",
"paths": {
"native-base": ["../src/index"]
"native-base": [
"../src/index"
]
},
"allowSyntheticDefaultImports": true,
"jsx": "react-native",
"lib": ["dom", "esnext"],
"lib": [
"dom",
"esnext"
],
"moduleResolution": "node",
"noEmit": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"strict": true
}
// "exclude": ["storybook"]
},
"extends": "expo/tsconfig.base"
}
3 changes: 3 additions & 0 deletions next-example/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
55 changes: 55 additions & 0 deletions next-example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel

# @generated: @expo/next-adapter@3.1.3
/.expo/*
# Expo Web
/web-build/*
# Expo Native
*.jks
*.p8
*.p12
*.key
*.mobileprovision
*.orig.*
# Next.js
/.next/*
/out/
# Next.js production
/build/
# Next.js dependencies
/.pnp
.pnp.js
# @end @expo/next-adapter
34 changes: 34 additions & 0 deletions next-example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
4 changes: 4 additions & 0 deletions next-example/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// @generated: @expo/next-adapter@3.1.3
// Learn more: https://github.com/expo/expo/blob/master/docs/pages/versions/unversioned/guides/using-nextjs.md#shared-steps

module.exports = { presets: ['@expo/next-adapter/babel'] };
6 changes: 6 additions & 0 deletions next-example/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
44 changes: 44 additions & 0 deletions next-example/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/** @type {import('next').NextConfig} */
const { withExpo } = require('@expo/next-adapter');
const withPlugins = require('next-compose-plugins');
const path = require('path');
const withTM = require('next-transpile-modules')(['react-native-web']);

const nextConfig = {
reactStrictMode: true,
experimental: {
externalDir: true,
},
webpack: (config) => {
config.resolve.alias = {
...(config.resolve.alias || {}),
// Transform all direct `react-native` imports to `react-native-web`
'react-native$': path.resolve(
__dirname,
'node_modules',
'react-native-web'
),
'native-base': path.resolve(__dirname, '..', 'src'),
'react': path.resolve(__dirname, 'node_modules', 'react'),
'react-dom': path.resolve(__dirname, 'node_modules', 'react-dom'),
'react-native-web': path.resolve(
__dirname,
'node_modules',
'react-native-web'
),
};
config.resolve.extensions = [
'.web.js',
'.web.jsx',
'.web.ts',
'.web.tsx',
...config.resolve.extensions,
];
return config;
},
};

module.exports = withPlugins(
[withTM, [withExpo, { projectRoot: __dirname }]],
nextConfig
);
31 changes: 31 additions & 0 deletions next-example/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "next-example",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"next": "11.1.2",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-native-aria": "^0.2.3",
"react-native-safe-area-context": "^3.3.2",
"react-native-svg": "^12.1.1",
"styled-components": "^5.3.3",
"styled-system": "^5.1.5"
},
"devDependencies": {
"@expo/next-adapter": "^3.1.3",
"@types/react": "17.0.30",
"eslint": "7.32.0",
"eslint-config-next": "11.1.2",
"next-compose-plugins": "^2.2.1",
"next-transpile-modules": "^8.0.0",
"react-native-web": "^0.17.5",
"typescript": "4.4.4"
}
}
12 changes: 12 additions & 0 deletions next-example/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react';
import type { AppProps } from 'next/app';
import { NativeBaseProvider } from 'native-base';

function MyApp({ Component, pageProps }: AppProps) {
return (
<NativeBaseProvider isSSR>
<Component {...pageProps} />
</NativeBaseProvider>
);
}
export default MyApp;
2 changes: 2 additions & 0 deletions next-example/pages/_document.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// @generated: @expo/next-adapter@3.1.3
export { default } from '@expo/next-adapter/document';
13 changes: 13 additions & 0 deletions next-example/pages/api/hello.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
import type { NextApiRequest, NextApiResponse } from 'next'

type Data = {
name: string
}

export default function handler(
req: NextApiRequest,
res: NextApiResponse<Data>
) {
res.status(200).json({ name: 'John Doe' })
}
119 changes: 119 additions & 0 deletions next-example/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
import React from 'react';
import type { NextPage } from 'next';
import { Text } from 'react-native';
import { Box, Stack, Button } from 'native-base';

const Home: NextPage = () => {
return (
<Stack
// space={[10, 20, 32]}
space={10}
direction={['row', 'row-reverse', 'column']}
// direction={'column'}
// flexWrap={'wrap'}
>
{/* <Text>hi</Text> */}
<Text>Hello</Text>
<Text>Hello</Text>
<Text>Hello</Text>
<Text>Hello</Text>
<Text>Hello</Text>
<Text>Hello</Text>
<Text>Hello</Text>
<Text>Hello</Text>
<Text>Hello</Text>
<Text>Hello</Text>

{/* <Button
w="16"
bg={['red.900', 'light.200', 'lightBlue.100']}
// _text={{ color: ['white', 'black', 'red.900'] }}
>
Text
</Button> */}
{/* <Button
w="16"
bg={['red.900', 'light.200', 'lightBlue.100']}
// _text={{ color: ['white', 'black', 'red.900'] }}
>
Text
</Button>
<Button
w="16"
bg={['red.900', 'light.200', 'lightBlue.100']}
// _text={{ color: ['white', 'black', 'red.900'] }}
>
Text
</Button>
<Button
w="16"
bg={['red.900', 'light.200', 'lightBlue.100']}
// _text={{ color: ['white', 'black', 'red.900'] }}
>
Text
</Button>
<Button
w="16"
bg={['red.900', 'light.200', 'lightBlue.100']}
// _text={{ color: ['white', 'black', 'red.900'] }}
>
Text
</Button>
<Button
w="16"
bg={['red.900', 'light.200', 'lightBlue.100']}
// _text={{ color: ['white', 'black', 'red.900'] }}
>
Text
</Button>
<Button
w="16"
bg={['red.900', 'light.200', 'lightBlue.100']}
// _text={{ color: ['white', 'black', 'red.900'] }}
>
Text
</Button>
<Button
w="16"
bg={['red.900', 'light.200', 'lightBlue.100']}
// _text={{ color: ['white', 'black', 'red.900'] }}
>
Text
</Button>
<Button
w="16"
bg={['red.900', 'light.200', 'lightBlue.100']}
// _text={{ color: ['white', 'black', 'red.900'] }}
>
Text
</Button>
<Button
w="16"
bg={['red.900', 'light.200', 'lightBlue.100']}
// _text={{ color: ['white', 'black', 'red.900'] }}
>
Text
</Button>
<Button
w="16"
bg={['red.900', 'light.200', 'lightBlue.100']}
// _text={{ color: ['white', 'black', 'red.900'] }}
>
Text
</Button> */}
{/*
<Button
w="16"
bg={['red.900', 'light.200', 'lightBlue.100']}
// _text={{ color: ['white', 'black', 'red.900'] }}
>
Text
</Button> */}
{/* <Box boxSize="20" bg="red.100"></Box> */}
</Stack>
);
};

export default Home;
Binary file added next-example/public/favicon.ico
Binary file not shown.
4 changes: 4 additions & 0 deletions next-example/public/vercel.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

1 comment on commit b4ed987

@vercel
Copy link

@vercel vercel bot commented on b4ed987 Jan 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.