notification-center.go 889 B

12345678910111213141516171819202122
  1. package basics
  2. import (
  3. "github.com/qor5/docs/docsrc/examples/e21_presents"
  4. "github.com/qor5/docs/docsrc/generated"
  5. "github.com/qor5/docs/docsrc/utils"
  6. . "github.com/theplant/docgo"
  7. "github.com/theplant/docgo/ch"
  8. )
  9. var NotificationCenter = Doc(
  10. Markdown(`
  11. To enable notification center: Call ~NotificationFunc~ on ~presets.Builder~ With 2 function parameters
  12. like this ~builder.NotificationFunc(NotifierComponent(), NotifierCount())~
  13. The first function is for rendering the content of the popup after user clicked the "bell icon".
  14. The second function is for rendering the number at the top right corner of the "bell icon".
  15. `),
  16. ch.Code(generated.NotificationCenterSample).Language("go"),
  17. utils.Demo("Notification Center", e21_presents.NotificationCenterSamplePath+"/pages", "e00_basics/notification-center.go"),
  18. ).Slug("basics/notification-center").Title("Notification Center")