* zin: refactor
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
namespace zin;
|
||||
|
||||
class dtable extends wg
|
||||
|
||||
+10
-6
@@ -1,18 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace zin;
|
||||
|
||||
class row extends wg
|
||||
{
|
||||
static $defineProps = 'justify,align';
|
||||
static $defineProps = 'justify?:string, align?:string';
|
||||
|
||||
protected function build()
|
||||
{
|
||||
$justify = empty($this->prop('justify')) ? 'start' : $this->prop('justify');
|
||||
$align = empty($this->prop('align')) ? 'start' : $this->prop('align');
|
||||
list($justify, $align) = $this->prop(array('justify', 'align'));
|
||||
|
||||
return div(
|
||||
setClass("row justify-$justify items-$align"),
|
||||
return div
|
||||
(
|
||||
setClass
|
||||
(
|
||||
'row',
|
||||
empty($justify) ? null : "justify-$justify",
|
||||
empty($align) ? null : "items-$align"
|
||||
),
|
||||
set($this->props->skip(array_keys(static::getDefinedProps()))),
|
||||
$this->children()
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user