summaryrefslogtreecommitdiffstats
path: root/vendor/ipl/web/src/Widget/HorizontalKeyValue.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/ipl/web/src/Widget/HorizontalKeyValue.php')
-rw-r--r--vendor/ipl/web/src/Widget/HorizontalKeyValue.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/vendor/ipl/web/src/Widget/HorizontalKeyValue.php b/vendor/ipl/web/src/Widget/HorizontalKeyValue.php
new file mode 100644
index 0000000..1d1195e
--- /dev/null
+++ b/vendor/ipl/web/src/Widget/HorizontalKeyValue.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace ipl\Web\Widget;
+
+use ipl\Html\BaseHtmlElement;
+use ipl\Html\Html;
+
+class HorizontalKeyValue extends BaseHtmlElement
+{
+ protected $key;
+
+ protected $value;
+
+ protected $defaultAttributes = ['class' => 'horizontal-key-value'];
+
+ protected $tag = 'div';
+
+ public function __construct($key, $value)
+ {
+ $this->key = $key;
+ $this->value = $value;
+ }
+
+ protected function assemble()
+ {
+ $this->add([
+ Html::tag('div', ['class' => 'key'], $this->key),
+ Html::tag('div', ['class' => 'value'], $this->value)
+ ]);
+ }
+}