File Coverage

blib/lib/Moonshine/Bootstrap/Component/NavbarText.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::NavbarText;
2              
3 8     8   207675 use Moonshine::Magic;
  8         153535  
  8         72  
4              
5             extends 'Moonshine::Bootstrap::Component';
6              
7             has(
8             navbar_text_spec => sub {
9             {
10             tag => { default => 'p' },
11             data => 1,
12             alignment_base => { default => 'navbar-' },
13             class_base => { default => 'navbar-text' },
14             };
15             }
16             );
17              
18             sub navbar_text {
19 22     22   6638 my ($self) = shift;
20              
21 22   50     207 my ( $base_args, $build_args ) = $self->validate_build(
22             {
23             params => $_[0] // {},
24             spec => $self->navbar_text_spec,
25             }
26             );
27              
28 22         296 return Moonshine::Element->new($base_args);
29             }
30              
31             1;
32              
33             __END__