adrema/app/View/Traits/HasFormDimensions.php

24 lines
461 B
PHP

<?php
namespace App\View\Traits;
trait HasFormDimensions
{
public function heightVars(): string
{
return data_get([
'default' => '--height: 35px; --padding: 3px;',
'sm' => '--height: 23px; --padding: 2px;',
], $this->size);
}
public function heightClass(): string
{
return data_get([
'default' => 'size-default',
'sm' => 'size-sm',
], $this->size);
}
}