Skip to content

Commit

Permalink
Utilize EmptyStateBar where applicable
Browse files Browse the repository at this point in the history
  • Loading branch information
nilmerg committed Sep 13, 2023
1 parent 87a0a7d commit 6cba501
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 26 deletions.
9 changes: 1 addition & 8 deletions asset/css/list/item-list.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@

.item-list {
list-style-type: none;

> .empty-state {
.rounded-corners();
background-color: @empty-state-bg-in-lists;
}
}

// Layout
Expand Down Expand Up @@ -55,10 +50,8 @@
}
}

> .empty-state {
> .empty-state-bar {
margin: 0 1em;
padding: 1em;
text-align: center;
}
}

Expand Down
11 changes: 1 addition & 10 deletions asset/css/list/item-table.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ ul.item-table {
list-style-type: none;
}

div.item-table {
> .empty-state {
.rounded-corners();
background-color: @empty-state-bg-in-lists;
}
}

.table-row {
color: @default-text-color-light;

Expand Down Expand Up @@ -87,10 +80,8 @@ ul.item-table {
}

div.item-table {
> .empty-state {
> .empty-state-bar {
margin: 0 1em;
padding: 1em;
text-align: center;
}
}

Expand Down
2 changes: 0 additions & 2 deletions asset/css/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@
@empty-state-color: @base-gray-semilight;
@empty-state-bar-bg: @base-gray-lighter;

@empty-state-bg-in-lists: @base-gray-lighter;
@list-item-title-hover-color: @base-primary-color;
@list-item-separation-bg: @base-gray-light;

Expand Down Expand Up @@ -212,7 +211,6 @@
--empty-state-color: var(--base-gray-semilight);
--empty-state-bar-bg: var(--base-gray-lighter);

--empty-state-bg-in-lists: var(--base-gray-lighter);
--list-item-title-hover-color: var(--base-primary-color);
--list-item-separation-bg: var(--base-gray-light);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Common/BaseItemList.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use ipl\Html\BaseHtmlElement;
use ipl\Orm\ResultSet;
use ipl\Stdlib\BaseFilter;
use ipl\Web\Widget\EmptyState;
use ipl\Web\Widget\EmptyStateBar;

/**
* Base class for item lists
Expand Down Expand Up @@ -67,7 +67,7 @@ protected function assemble(): void

if ($this->isEmpty()) {
$this->setTag('div');
$this->addHtml(new EmptyState(t('No items found.')));
$this->addHtml(new EmptyStateBar(t('No items found.')));
}
}
}
4 changes: 2 additions & 2 deletions src/Common/BaseItemTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use ipl\Html\BaseHtmlElement;
use ipl\Orm\ResultSet;
use ipl\Stdlib\BaseFilter;
use ipl\Web\Widget\EmptyState;
use ipl\Web\Widget\EmptyStateBar;

/**
* Base class for item tables
Expand Down Expand Up @@ -82,7 +82,7 @@ protected function assemble(): void

if ($this->isEmpty()) {
$this->setTag('div');
$this->addHtml(new EmptyState(t('No items found.')));
$this->addHtml(new EmptyStateBar(t('No items found.')));
}
}
}
4 changes: 2 additions & 2 deletions src/Common/BaseOrderedItemList.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace ipl\Web\Common;

use ipl\Web\Widget\EmptyState;
use ipl\Web\Widget\EmptyStateBar;

/**
* @method BaseOrderedListItem getItemClass()
Expand All @@ -25,7 +25,7 @@ protected function assemble(): void

if ($this->isEmpty()) {
$this->setTag('div');
$this->addHtml(new EmptyState(t('No items found.')));
$this->addHtml(new EmptyStateBar(t('No items found.')));
}
}
}

0 comments on commit 6cba501

Please sign in to comment.