https://github.com/trychlos/pwix-plus-button
A Blaze component which provides a circled-'+' button
https://github.com/trychlos/pwix-plus-button
Last synced: 13 days ago
JSON representation
A Blaze component which provides a circled-'+' button
- Host: GitHub
- URL: https://github.com/trychlos/pwix-plus-button
- Owner: trychlos
- Created: 2023-06-14T08:09:01.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-11-19T15:09:40.000Z (over 1 year ago)
- Last Synced: 2025-03-05T18:56:50.263Z (about 1 year ago)
- Language: JavaScript
- Size: 115 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
Awesome Lists containing this project
README
# pwix:plus-button
## What is it
A simple Blaze component for Meteor which provides a circled-'+' button.
Why this package?
Well because we cannot just copy a Blaze component in each and every package or application which would need it:
- first, because this is always a bad idea to just duplicate code, as this obviously also duplicates maintenance efforts and bugs
- second, because Blaze has a single namespace per application, and so refuses to have a duplicated component name.
This is a client-only package.
## Usage
Very simple:
### Include in your HTML template
```
{{> PlusButton }}
```
### Handle the event in your JS code
```
'click .PlusButton'( event, instance ){
}
```
## Configuration
None at the moment.
## Provides
The package exports the `PlusButton` global object.
### Blaze components
#### `PlusButton`
A simple circled-'plus' button.
The component is configurable with an object passed as an argument, which may contain:
- `classes`:
The classes to set on the `button` element.
Defaults to `btn btn-primary`.
- `enabled`:
A ReactiveVar.
If provided, then the button will be enabled (resp. disabled) if the ReactiveVar evaluates as truthy (resp. falsy).
When not provided, the button is enabled.
- `label`:
The label of the displayed button as a HTML string.
Defaulting to a big plus '+'.
- `shape`:
The shape of the displayed button.
Allowed values are:
- `PlusButton.C.Shape.CIRCLE`
- `PlusButton.C.Shape.RECTANGLE`
Defaults to `PlusButton.C.Shape.CIRCLE`.
- `title`:
The title of the displayed button as a string.
No default.
## NPM peer dependencies
This package has no NPM dependencies.
---
P. Wieser
- Last updated on 2026, Apr. 2nd