tapforce-ui
v1.1.1
Published
## **Installation**
Downloads
304
Readme
Tapforce UI Library
Installation
To install, follow these steps:
1. Using SSH (Preferred Method)
Make sure you have SSH access to the private repository. Add the package to your project with:
pnpm add git+ssh://[email protected]:tapforce/tapforce-ui.git
2. Using HTTPS (Requires Personal Access Token)
If SSH is not an option, use HTTPS with your GitHub Personal Access Token (PAT):
pnpm add https://<PAT>@github.com/tapforce/tapforce-ui.git
Replace <PAT>
with your personal access token
Usage
Here’s an example of how to use the SaveToolbar
component in your project:
1. Import the Component
<script>
import SaveToolbar from 'tapforce-ui';
</script>
2. Use the Component
<SaveToolbar
onSave={async () => {
try {
// Mock save function
const success = await saveData(); // Replace with your actual save logic
return success; // Return true for success, false for error
} catch (error) {
console.error(error);
return false; // Return false for error
}
}}
/>
Development
If you need to modify the library, follow these steps:
1. Clone the Repository
git clone [email protected]:tapforce/tapforce-ui.git
cd tapforce-ui
2. Install Dependencies
pnpm install
3. Run Development Server
To develop and test the component:
pnpm dev
4. Build the Package
To generate the production build:
pnpm package
This will create the dist
directory with the library files.