Skip to content

Commit 8252de8

Browse files
committed
improve readme
1 parent 0e7b048 commit 8252de8

File tree

1 file changed

+42
-1
lines changed

1 file changed

+42
-1
lines changed

README.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,49 @@
1-
# components
1+
# @cldn/components
2+
23
Base classes for creating web components.
34

5+
This library is intended for use in a web browser environment. A bundler, such as [Webpack](https://webpack.js.org/)
6+
or [Vite](https://vitejs.dev/) is recommended.
7+
8+
[**Documentation**](https://components.cldn.pro)
9+
410
## Installation
511

612
```shell
713
npm i @cldn/components
814
```
15+
16+
## Usage
17+
18+
To create your own components, it's recommended to extend one of the classes provided in this library.
19+
20+
For example:
21+
22+
```ts
23+
import {Component} from "@cldn/components";
24+
25+
class ButtonComponent extends Component<HTMLButtonElement> {
26+
public constructor(text: string) {
27+
super("button");
28+
this.text(text)
29+
.class("bg-blue-500", "px-4", "");
30+
}
31+
}
32+
```
33+
34+
## Licence
35+
36+
Copyright © 2024 Cloudnode OÜ
37+
38+
This file is part of @cldn/components.
39+
40+
@cldn/components is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General
41+
Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
42+
later version.
43+
44+
@cldn/components is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
45+
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
46+
details.
47+
48+
You should have received a copy of the GNU Lesser General Public License along with @cldn/components. If not,
49+
see https://www.gnu.org/licenses/.

0 commit comments

Comments
 (0)