Liking cljdoc? Tell your friends :D

Fancy Alert

Fancy Alert is a customizable drop in replacement for the standard Javascript/Clojurescript alert box.

Overview

IN PROGRESS

Accepted Properties

All properties are passed as a map to the startup function

:text - Text for the alert to display
:timeout - Time before the alert closes itself, can be turn off when hideAfterN is false
:hideAfterN - Bool, sets whether the alert should close on it's own
:showButton - Bool, sets whether a close button should be displayed, defaults to true if hideAfterN is false
:buttonProperties - map of properties for the button
:buttonText - Button properties key - text to display for close button if present
:styles - Custom styles for the alert box - see below for example

Styling

Styles are taken as a map on the initial call as part of a :syles key

{:styles {
  :background "red;"
  :color "white;"
}}

This is then merged in with the base styles object. Anything passed in will overwrite the defaults, and anything not present by default will be accepted.

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close