Fix card list block empty state and update size

This commit is contained in:
Andrew Kingston 2021-11-08 16:40:45 +00:00
parent 3e5980082f
commit de9c038150
3 changed files with 18 additions and 8 deletions

View File

@ -38,6 +38,7 @@
padding: var(--spacing-l);
display: grid;
place-items: center;
grid-column: 1 / -1;
}
.noRows i {
margin-bottom: var(--spacing-m);

View File

@ -74,7 +74,7 @@
<style>
.spectrum-Card {
width: 240px;
width: 300px;
border-color: var(--spectrum-global-color-gray-300) !important;
display: flex;
flex-direction: column;
@ -85,6 +85,9 @@
flex-direction: row;
width: 420px;
}
.spectrum-Card-container {
padding: var(--spectrum-global-dimension-size-50) 0;
}
.spectrum-Card-title :global(a) {
text-overflow: ellipsis;
overflow: hidden;
@ -123,10 +126,19 @@
.spectrum-Card-footer {
border-top: none;
padding-top: 0;
padding-bottom: 0;
margin-top: -8px;
margin-bottom: var(
--spectrum-card-body-padding-bottom,
var(--spectrum-global-dimension-size-300)
);
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.button-container {
margin-top: -3px;
margin-bottom: var(--spectrum-global-dimension-size-300);
}
</style>

View File

@ -41,7 +41,7 @@
$: enrichedSearchColumns = enrichSearchColumns(searchColumns, schema)
$: enrichedFilter = enrichFilter(filter, enrichedSearchColumns, formId)
$: cardWidth = cardHorizontal ? 420 : 240
$: cardWidth = cardHorizontal ? 420 : 300
// Enrich the default filter with the specified search fields
const enrichFilter = (filter, columns, formId) => {
@ -140,9 +140,10 @@
props={{
dataProvider: `{{ literal [${dataProviderId}] }}`,
direction: "row",
hAlign: "left",
hAlign: "stretch",
vAlign: "top",
gap: "M",
noRowsMessage: "No rows found",
}}
styles={{
display: "grid",
@ -172,10 +173,6 @@
</Block>
<style>
.card-list :global(.spectrum-Card) {
width: auto !important;
}
.header {
display: flex;
flex-direction: row;