Revision 9f0d1cd0
Von Cem Aydin vor mehr als 1 Jahr hinzugefügt
SL/Presenter/MaterialComponents.pm | ||
---|---|---|
our @EXPORT_OK = qw(
|
||
button_tag
|
||
input_tag
|
||
textarea_tag
|
||
date_tag
|
||
submit_tag
|
||
icon
|
||
... | ... | |
);
|
||
}
|
||
|
||
sub textarea_tag {
|
||
my ($name, $value, %attributes) = @_;
|
||
|
||
_set_id_attribute(\%attributes, $attributes{name});
|
||
|
||
my $class = delete $attributes{class};
|
||
my $icon = $attributes{icon}
|
||
? icon(delete $attributes{icon}, class => 'prefix')
|
||
: '';
|
||
|
||
my $label = $attributes{label}
|
||
? html_tag('label', delete $attributes{label}, for => $attributes{id})
|
||
: '';
|
||
|
||
html_tag('div',
|
||
$icon .
|
||
html_tag('textarea', $value, class => 'materialize-textarea', %attributes, name => $name) .
|
||
$label,
|
||
class => [ grep $_, $class, INPUT_FIELD ],
|
||
);
|
||
}
|
||
|
||
sub date_tag {
|
||
my ($name, $value, %attributes) = @_;
|
||
|
Auch abrufbar als: Unified diff
Mobile Design: MaterialComponents Presenter textarea input hinzugefügt