From 3682a0fd8af4b2b996cde4ce9928a4d7db0c6f00 Mon Sep 17 00:00:00 2001 From: Hao Sun Date: Fri, 17 Feb 2023 15:48:30 +0800 Subject: [PATCH] * zin: refactor --- zin/wg/dtable/v1.php | 1 - zin/wg/row/v1.php | 16 ++++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/zin/wg/dtable/v1.php b/zin/wg/dtable/v1.php index 89bdb5688f..9d506cf2e0 100644 --- a/zin/wg/dtable/v1.php +++ b/zin/wg/dtable/v1.php @@ -1,5 +1,4 @@ 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() );