hirst-dialog
is a Polymer-based web component to implement web dialogs.
To install the element:
$ bower install hirst-dialog
<hirst-action-dialog
id="dialog"
title="Congratulations">
It works!
</hirst-action-dialog>
<hirst-confirm-dialog
id="dialog"
title="Congratulations"
confirm-title="CONFIRM"
dismiss-title="DISMISS">
It works!
</hirst-confirm-dialog>
The component involves patch
, the workaround of bugs that may happen on different targets. The bugs can be fixed with the patch
, e.g. Wrong caret position bug on iOS 11.
By default, the patch
is enabled, but it can't be disabled with the following:
<body hirst-dialog-patch="disabled">
...
</body>
Polymer CLI and Bower should be installed globally.
$ npm install polymer-cli --global
$ npm install bower --global
Then install all components required in the project:
$ bower install
To view reusable component on the browser:
$ polymer serve
Then open the browser and go to the url the terminal or console implies, something like this:
http://localhost:3030/components/hirst-dialog/
Or you may indicate different hostname and port to serve from
$ polymer serve --hostname 10.20.21.51 --port 80
$ polymer test