<?php

namespace Plainwork\Ui\Renderer\Form;

use Plainwork\Ui\Component\Form\DatePeriodInput;
use Plainwork\Ui\Component\InlineList;

class DatePeriodInputRenderer
{
    public function __invoke(DatePeriodInput $el)
    {
        $ret = (new InlineList())
            ->add($el->getInputQty())
            ->add($el->getInputUnit()->withAttr('style', ['width' => '8em']))
            ;

        return $ret;
    }
}
