### ----------------------------------------------------
### -- HTML::Component
### -- Licenses: Artistic-2.0
### -- Authors: Fernando Corrêa
### -- File: examples/users/App.rakumod
### ----------------------------------------------------
use HTML::Component;
use HTML::Component::Endpoint;
use HTML::Component::Boilerplate;
use User;

unit class App does HTML::Component;

method RENDER($_) {
  boilerplate
    :body{
      .a: :endpoint(User), { .add-child: "Create User" };
      .ol: {;
        for User.^all -> User:D $user {
          .li: {
            .add-child: $user
          }
        }
      }
    }
  ;
}


