File Coverage

blib/lib/Moonshine/Bootstrap/Component/TextLabel.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition 1 2 50.0
subroutine 2 2 100.0
pod n/a
total 9 10 90.0


line stmt bran cond sub pod time code
1             package Moonshine::Bootstrap::Component::TextLabel;
2              
3 5     5   189046 use Moonshine::Magic;
  5         102722  
  5         44  
4              
5             extends 'Moonshine::Bootstrap::Component';
6              
7             has(
8             text_label_spec => sub {
9             {
10             data => 1,
11             tag => { default => 'span' },
12             class_base => { default => 'label' },
13             switch => { default => 'default' },
14             switch_base => { default => 'label-' },
15             };
16             }
17             );
18              
19             sub text_label {
20 13     13   73687 my ($self) = shift;
21              
22 13   50     73 my ( $base_args, $build_args ) = $self->validate_build(
23             {
24             params => $_[0] // {},
25             spec => $self->text_label_spec,
26             }
27             );
28              
29 13         121 return Moonshine::Element->new($base_args);
30             }
31              
32             1;
33              
34             __END__