projex-web-components v1.6.0
Projex Web Components
Projex Web Components is a library that uses Lit to create reusable Web Components that can be used in Angular and React applications.
Installation
To install the library, you can use npm or yarn:
npm install projex-web-components
or
yarn add projex-web-components
Usage in Angular
To use the components in an Angular application, follow these steps:
- Import
CUSTOM_ELEMENTS_SCHEMA
and the browser module in yourapp.module.ts
. - Import the package
projex-web-components/dist/index.js
. - Make sure to add
CUSTOM_ELEMENTS_SCHEMA
in the module schemas.
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import 'projex-web-components/dist/index.js';
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule],
providers: [],
bootstrap: [AppComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA], // Add this line
})
export class AppModule {}
Usage in React
To use the components in a React application, follow these steps:
- Import the package
projex-web-components/dist/index.js
in your main file (e.g.,index.js
orApp.js
).
import React from 'react';
import ReactDOM from 'react-dom';
import 'projex-web-components/dist/index.js';
import App from './App';
ReactDOM.render(<App />, document.getElementById('root'));
- Use the component in your React application.
function App() {
return (
<div className="App">
<my-component></my-component>
</div>
);
}
export default App;
Contribution
If you want to contribute to this project, please follow these guidelines:
- Fork the repository.
- Create a new branch (
git checkout -b feature/new-feature
). - Make your changes and commit them (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature/new-feature
). - Create a Pull Request.
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago