sycho / flarum-uikit
Frontend utilities for extension developers.
Fund package maintenance!
Other
Installs: 10 523
Dependents: 6
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
Language:TypeScript
Requires
- flarum/core: ^2.0.0
README
Flarum UiKit with reusable frontend utilities for extension developers. (Not An Extension)
Usage
Use the package's extender to register its resources.
extend.php
return [ new SychO\UiKit\Extend\Register, ];
example.js
import ProgressBar from 'ext:sycho/flarum-uikit/common/ProgressBar'; import Label from 'ext:sycho/flarum-uikit/common/Label'; import LabelGroup from 'ext:sycho/flarum-uikit/common/LabelGroup'; import DiscussionSearch from 'ext:sycho/flarum-uikit/forum/DiscussionSearch'; /** * @param mini bool small sized * @param alternate bool works with backgrounds using control-bg background color * @param progress number percentage * @param className string */ <ProgressBar fancy={true} mini={false} alternate={false} progress={93} /> /** * @param color string */ <Label color="red">Text</Label> /** * Container for a group of labels */ <LabelGroup></LabelGroup> /** * @param state GlobalSearchState * @param ignore number * @param onSelect (discussion: Discussion) => void */ <DiscussionSearch state={} ignore={485} onSelect={(discussion) => ...} />
Installation
$ composer require sycho/flarum-uikit:^0.3.0
Updating
$ composer update sycho/flarum-uikit:^0.3.0
Links
License
The MIT License.