Skip to content

Commit 0769418

Browse files
committed
New templates in Create React Dependency
1 parent f9845da commit 0769418

File tree

7 files changed

+83
-4
lines changed

7 files changed

+83
-4
lines changed
Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
import React from "react";
2-
import Library from "../lib";
2+
import Button from "../lib";
3+
import logo from "./logo.png";
34

4-
const App = () => <Library />;
5+
const App = () => (
6+
<div className="content">
7+
<img src={logo} className="logo" alt="Logo Create React Dependency" />
8+
<h1 className="title">Create React Dependency</h1>
9+
<section className="library">
10+
<Button onClick={() => alert("button")}>My Library Button</Button>
11+
</section>
12+
</div>
13+
);
514

615
export default App;
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
body,
2+
#root {
3+
margin: 0;
4+
padding: 0;
5+
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
6+
}
7+
8+
html,
9+
body,
10+
#root {
11+
width: 100%;
12+
height: 100%;
13+
}
14+
15+
.content {
16+
background-color: #37474f;
17+
width: 100%;
18+
height: 100%;
19+
display: flex;
20+
align-items: center;
21+
justify-content: center;
22+
flex-direction: column;
23+
}
24+
25+
.title {
26+
color: #ffd600;
27+
margin-bottom: 80px;
28+
margin-top: 0px;
29+
}
30+
31+
.logo {
32+
width: auto;
33+
height: 300px;
34+
}
35+
36+
.library {
37+
width: 600px;
38+
max-width: 100%;
39+
height: 300px;
40+
background-color: white;
41+
display: flex;
42+
align-items: center;
43+
justify-content: center;
44+
overflow: scroll;
45+
border-radius: 5px;
46+
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
47+
0 3px 1px -2px rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);
48+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22
import ReactDOM from "react-dom";
3-
43
import App from "./App";
4+
import "./index.css";
55

66
ReactDOM.render(<App />, document.getElementById("root"));
Loading
Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
import React from "react";
22

3-
export const Lib = () => <div>My React Dependency</div>;
3+
export const Lib = props => (
4+
<button
5+
style={{
6+
border: "none",
7+
boxShadow: "none",
8+
backgroundColor: "#00838f",
9+
color: "#FFF",
10+
padding: "0px 20px",
11+
fontSize: 20,
12+
height: 40
13+
}}
14+
{...props}
15+
/>
16+
);
417

518
export default Lib;

packages/react-dependency-scripts/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"babel-plugin-module-resolver": "^3.2.0",
3535
"babel-preset-react-app": "^9.0.2",
3636
"css-loader": "^3.2.0",
37+
"file-loader": "^4.2.0",
3738
"html-webpack-plugin": "^3.2.0",
3839
"image-webpack-loader": "^6.0.0",
3940
"jest": "^24.9.0",

yarn.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4734,6 +4734,14 @@ figures@^2.0.0:
47344734
dependencies:
47354735
escape-string-regexp "^1.0.5"
47364736

4737+
file-loader@^4.2.0:
4738+
version "4.2.0"
4739+
resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-4.2.0.tgz#5fb124d2369d7075d70a9a5abecd12e60a95215e"
4740+
integrity sha512-+xZnaK5R8kBJrHK0/6HRlrKNamvVS5rjyuju+rnyxRGuwUJwpAMsVzUl5dz6rK8brkzjV6JpcFNjp6NqV0g1OQ==
4741+
dependencies:
4742+
loader-utils "^1.2.3"
4743+
schema-utils "^2.0.0"
4744+
47374745
[email protected], file-type@^5.2.0:
47384746
version "5.2.0"
47394747
resolved "https://registry.yarnpkg.com/file-type/-/file-type-5.2.0.tgz#2ddbea7c73ffe36368dfae49dc338c058c2b8ad6"

0 commit comments

Comments
 (0)