1 package Reaction::UI::Widget::Action;
3 use Reaction::UI::WidgetClass;
5 use namespace::clean -except => [ qw(meta) ];
6 extends 'Reaction::UI::Widget::Object';
10 after fragment widget {
11 arg 'method' => $_{viewport}->method;
14 implements fragment ok_button_fragment {
15 if (grep { $_ eq 'ok' } $_{viewport}->accept_events) {
16 arg 'event_id' => event_id 'ok';
17 arg 'label' => $_{viewport}->ok_label;
22 implements fragment apply_button_fragment {
23 if (grep { $_ eq 'apply' } $_{viewport}->accept_events) {
24 arg 'event_id' => event_id 'apply';
25 arg 'label' => $_{viewport}->apply_label;
26 render 'apply_button';
30 implements fragment cancel_button_fragment {
31 if (grep { $_ eq 'close' } $_{viewport}->accept_events) {
32 arg 'event_id' => event_id 'close';
33 arg 'label' => $_{viewport}->close_label;
34 render 'cancel_button';
38 __PACKAGE__->meta->make_immutable;
47 Reaction::UI::Widget::Action
53 =head2 ok_button_fragment
55 =head2 apply_button_fragment
57 =head2 cancel_button_fragment
61 See L<Reaction::Class> for authors.
65 See L<Reaction::Class> for the license.