documentation update, some api docs, overview and tutorial upto first DM and IM inclu...
[catagits/Reaction.git] / lib / Reaction / UI / Widget / Field / Container.pm
1 package Reaction::UI::Widget::Field::Container;
2
3 use Reaction::UI::WidgetClass;
4
5 use namespace::clean -except => [ qw(meta) ];
6
7 before fragment widget {
8   arg name  => $_{viewport}->name;
9 };
10
11 implements fragment maybe_label {
12   return unless $_{viewport}->has_label;
13   arg label => $_{viewport}->label;
14   render 'label';
15 };
16
17 implements fragment field_list {
18   render field => over $_{viewport}->fields;
19 };
20
21 implements fragment field {
22   render 'viewport';
23 };
24
25 __PACKAGE__->meta->make_immutable;
26
27 1;
28
29 __END__;
30
31 =head1 NAME
32
33 Reaction::UI::Widget::Field::Container
34
35 =head1 DESCRIPTION
36
37 =head1 FRAGMENTS
38
39 =head2 field_list
40
41 Sequentially renders the C<fields> of the viewport;
42
43 =head2 field
44
45 Renders the C<field> viewport passed by C<field_list>
46
47 =head1 AUTHORS
48
49 See L<Reaction::Class> for authors.
50
51 =head1 LICENSE
52
53 See L<Reaction::Class> for the license.
54
55 =cut
56