Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
declare(strict_types=1);
4
 
5
namespace Termwind\Components;
6
 
7
final class BreakLine extends Element
8
{
9
    /**
10
     * Get the string representation of the element.
11
     */
12
    public function toString(): string
13
    {
14
        $display = $this->styles->getProperties()['styles']['display'] ?? 'inline';
15
 
16
        if ($display === 'hidden') {
17
            return '';
18
        }
19
 
20
        if ($display === 'block') {
21
            return parent::toString();
22
        }
23
 
24
        return parent::toString()."\r";
25
    }
26
}