Skip to content

Commit 4f1da07

Browse files
committed
added some atoms
1 parent 6fb82c6 commit 4f1da07

File tree

22 files changed

+255
-23
lines changed

22 files changed

+255
-23
lines changed

README.md

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# chatql-ui-react
22

3-
A component library template based on [create-react-app](https://github.com/facebook/create-react-app). Including documentation. This template is used by [generator-react-exhibit](generator-react-exhibit).
4-
5-
View it live [here](https://au-re.github.io/react-exhibit-template/).
3+
A react chat and general UI kit for Chatql
64

75
## Tech Stack
86

@@ -24,9 +22,6 @@ updating [npm](https://www.npmjs.com/) to version >=5.
2422

2523
## Getting started
2624

27-
You will need [Yeoman](http://yeoman.io/) installed to use this generator.
28-
You can install both with the following commands:
29-
3025
```sh
3126
npm install
3227
```
@@ -84,22 +79,6 @@ npm run build:storybook
8479

8580
This will create a folder called `storybook-static` with your documentation.
8681

87-
### Deploy
88-
89-
After building your documentation, you can deploy it as a gh-page.
90-
Make sure to add a homepage entry in your `package.json` like so:
91-
92-
```json
93-
{
94-
"homepage": "https://juicycleff.github.io/chatql-ui-react/",
95-
}
96-
```
97-
98-
Then simply run:
99-
```sh
100-
npm run deploy
101-
```
102-
10382
You can also publish your library to `npm`. To do that, simply run:
10483

10584
```sh
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/components/atom/Input/Input.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import styled from "styled-components";
2+
3+
const Input = styled.input`
4+
text-align: left;
5+
line-height: 2.5rem;
6+
font-size: 1rem;
7+
font-family: sans-serif;
8+
font-weight: 700;
9+
padding: 0 12px;
10+
transition: all 0.2s;
11+
border-radius: 2px;
12+
13+
:hover {
14+
border-color: blueviolet;
15+
}
16+
`;
17+
18+
export default Input;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { storiesOf } from "@storybook/react";
2+
import React, { Fragment } from "react";
3+
import { withDocs } from "storybook-readme";
4+
5+
import Input from "./Input";
6+
import readme from "./README.md";
7+
8+
storiesOf("Input", module)
9+
.addDecorator(withDocs(readme))
10+
.add("a simple input", () =>
11+
<Fragment>
12+
<Input placeholder="Type a message" />
13+
</Fragment>);
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import "jest-styled-components";
2+
3+
import React from "react";
4+
import renderer from "react-test-renderer";
5+
6+
import Input from "./Input";
7+
8+
describe("Input", () => {
9+
10+
it("renders without props", () => {
11+
const tree = renderer.create(<Input />).toJSON();
12+
expect(tree).toMatchSnapshot();
13+
});
14+
});
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Input
2+
===
3+
4+
A simple Input to showcase the library.
5+
6+
```jsx
7+
<Input placeholder="Type a message" />
8+
```
9+
10+
<!-- STORY -->

0 commit comments

Comments
 (0)