Deprecated
This package is now deprecated and has been replaced by slidey-pane. Please use that package instead.
angular-action-sheet
a directive that provides content in a sheet that slides out like a drawer
This directive provides very a very simple content area that you can slide in and out much like a modal with hopes of being less obtrusive than a modal and more responsive on small screens.
Note: This project is unstable and very likely to change
Installation
npm install --save angular-action-sheet
Include the directive in your html
Add jbActionSheet
to your module's dependencies
angular;
You'll probably want the styles too (for now, just .scss is provided)
;
Usage
Just use the jb-action-sheet
directive somewhere and add your content:
your content here
If you want to create custom sheet sizes, just define some styles like this:
then include the class on the jb-action-sheet
directive like this:
Optionally: you can use the included dist/sizes.css
which provides
.jbas-sheet--big
, .jbas-sheet--med
, .jbas-sheet--small
.
Note: Currently this directive hacks a .jbas-clipped
class to the body when
the sheet is in the revealed state. This will be fixed sometime to be less
hacky.
Directive Attributes
reveal
reveal
is watched. When it becomes true, the sheet is revealed.
on-close
Provide any expression to be evaluated when the user clicks the close button on the sheet.
size
A bit of a hacky solution at the moment to control the size of the sheet. Can
be any of big
, med
, small
.
This functionality is almost certianly going to change soon.
TODO
Lots of things!