package Reaction::UI::Widget::Field::Image; use Reaction::UI::WidgetClass; use namespace::clean -except => [ qw(meta) ]; extends 'Reaction::UI::Widget::Field'; implements fragment image { if($_{viewport}->value_string) { arg uri => $_{viewport}->uri; render 'has_image'; } else { render 'no_image'; } }; __PACKAGE__->meta->make_immutable; 1; __END__ =head1 NAME Reaction::UI::Widget::Field::Image - An image field =head1 DESCRIPTION This L widget represents an image. =head1 FRAGMENTS =head2 image If the viewport's C is true, it will render the C fragment after setting the C argument to the value of the viewport's C. If the C is false the C fragment will be rendered. =head1 SEE ALSO =over 4 =item * L =item * L =back =head1 AUTHORS See L for authors. =head1 LICENSE See L for the license. =cut