1 package Reaction::UI::Widget::Action;
3 use Reaction::UI::WidgetClass;
5 use namespace::clean -except => [ qw(meta) ];
6 extends 'Reaction::UI::Widget::Object::Mutable';
8 after fragment widget {
9 arg 'method' => $_{viewport}->method;
12 implements fragment ok_button_fragment {
13 if (grep { $_ eq 'ok' } $_{viewport}->accept_events) {
14 arg 'event_id' => event_id 'ok';
15 arg 'label' => localized $_{viewport}->ok_label;
20 implements fragment apply_button_fragment {
21 if (grep { $_ eq 'apply' } $_{viewport}->accept_events) {
22 arg 'event_id' => event_id 'apply';
23 arg 'label' => localized $_{viewport}->apply_label;
24 render 'apply_button';
28 implements fragment cancel_button_fragment {
29 if (grep { $_ eq 'close' } $_{viewport}->accept_events) {
30 arg 'event_id' => event_id 'close';
31 arg 'label' => localized $_{viewport}->close_label;
32 render 'cancel_button';
36 __PACKAGE__->meta->make_immutable;
45 Reaction::UI::Widget::Action
51 =head2 ok_button_fragment
53 =head2 apply_button_fragment
55 =head2 cancel_button_fragment
59 See L<Reaction::Class> for authors.
63 See L<Reaction::Class> for the license.