1
0
Fork 0
mirror of synced 2024-07-01 20:41:03 +12:00

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); padding: var(--spacing-l);
display: grid; display: grid;
place-items: center; place-items: center;
grid-column: 1 / -1;
} }
.noRows i { .noRows i {
margin-bottom: var(--spacing-m); margin-bottom: var(--spacing-m);

View file

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

View file

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