Skip to content

Commit f263271

Browse files
author
Ulises Giacoman
committed
init
0 parents  commit f263271

File tree

6 files changed

+2872
-0
lines changed

6 files changed

+2872
-0
lines changed

.gitignore

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
6+
# Runtime data
7+
pids
8+
*.pid
9+
*.seed
10+
*.pid.lock
11+
12+
# Directory for instrumented libs generated by jscoverage/JSCover
13+
lib-cov
14+
15+
# Coverage directory used by tools like istanbul
16+
coverage
17+
18+
# nyc test coverage
19+
.nyc_output
20+
21+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
22+
.grunt
23+
24+
# node-waf configuration
25+
.lock-wscript
26+
27+
# Compiled binary addons (http://nodejs.org/api/addons.html)
28+
build/Release
29+
30+
# Dependency directories
31+
node_modules
32+
jspm_packages
33+
.next
34+
# Optional npm cache directory
35+
.npm
36+
37+
# Optional eslint cache
38+
.eslintcache
39+
40+
# Optional REPL history
41+
.node_repl_history
42+
43+
# Output of 'npm pack'
44+
*.tgz
45+
46+
# Yarn Integrity file
47+
.yarn-integrity
48+
**/.DS_Store

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### SSR React components, testing with Next.js
2+
3+
1. Button with Ink ripple

components/button.js

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import React from 'react'
2+
import Ink from 'react-ink'
3+
4+
export default class Button extends React.Component {
5+
render () {
6+
return (
7+
<button style={{ position: "relative" }}>
8+
<style>
9+
{`body {
10+
font-family: Roboto, sans-serif;
11+
margin: 0;
12+
padding: 40px;
13+
}
14+
canvas {
15+
color: #673AB7;
16+
}
17+
button {
18+
background: #fff;
19+
border: 0;
20+
border-radius: 2px;
21+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
22+
font-size: 16px;
23+
font-family: inherit;
24+
min-width: 180px;
25+
padding: 12px 24px;
26+
text-transform: uppercase;
27+
}
28+
button:focus {
29+
outline: none;
30+
}`}
31+
</style>
32+
<Ink/>
33+
{this.props.text}
34+
</button>
35+
)
36+
}
37+
}

package.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "ssr-components",
3+
"version": "1.0.0",
4+
"main": "index.js",
5+
"author": "uli",
6+
"license": "MIT",
7+
"dependencies": {
8+
"next": "^2.0.0-beta",
9+
"react-ink": "^6.1.0"
10+
},
11+
"scripts": {
12+
"dev": "next"
13+
}
14+
}

pages/index.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import Button from '../components/button'
2+
3+
export default () => (
4+
<div>
5+
<Button text='hi'/>
6+
</div>
7+
)

0 commit comments

Comments
 (0)