Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add skynexui to examples #33326

Merged
merged 6 commits into from
Jan 17, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions examples/with-skynexui-components/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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
29 changes: 29 additions & 0 deletions examples/with-skynexui-components/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Example app with @skynexui/components

Next.js ships with [styled-jsx](https://github.com/vercel/styled-jsx) allowing you to write scoped styled components with full CSS support. This is important for the modularity and code size of your bundles and also for the learning curve of the framework. If you know CSS you can write `styled-jsx` right away.

With [@skynexui/components](https://github.com/skynexui/components/) you will be allowed to use the advantages of `styled-jsx` in a component utility first approach to create your own UI with good and configurable defaults.

## Preview

Preview the example live on [StackBlitz](http://stackblitz.com/):

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/vercel/next.js/tree/canary/examples/with-skynexui-components)

## Deploy your own

Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example):

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-skynexui-components&project-name=with-skynexui-components&repository-name=with-skynexui-components)

## How to use

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example:

```bash
npx create-next-app --example with-skynexui-components with-skynexui-components-app
# or
yarn create next-app --example with-skynexui-components with-skynexui-components-app
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
15 changes: 15 additions & 0 deletions examples/with-skynexui-components/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"private": true,
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@skynexui/components": "^1.9.23",
"next": "latest",
"react": "^17.0.2",
"react-dom": "^17.0.2"
}
}
17 changes: 17 additions & 0 deletions examples/with-skynexui-components/pages/_app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Provider } from '@skynexui/components'

export default function App({ Component, pageProps }) {
return (
<Provider
theme={{
components: {
textField: {
variant: 'basicBordered', // or put "bottomBorder"
},
},
}}
>
<Component {...pageProps} />
</Provider>
)
}
36 changes: 36 additions & 0 deletions examples/with-skynexui-components/pages/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { Box, Text, TextField } from '@skynexui/components'

export default function Index() {
return (
<Box
styleSheet={{
marginVertical: {
xs: '16px',
md: '32px',
},
marginHorizontal: 'auto',
maxWidth: '50%',
}}
>
<Text tag="h1" variant="heading2">
@skynexui/components with Next.js!
</Text>
<Text
tag="p"
styleSheet={{
marginBottom: '16px',
}}
>
Change ./pages/_app.js to modify the default theme
</Text>
<Box
styleSheet={{
backgroundColor: '#EEEEEE',
padding: '32px',
}}
>
<TextField label="Sample Field" value="Initial Value" />
</Box>
</Box>
)
}