diff --git a/resources/css/elements/tables.css b/resources/css/elements/tables.css index e944ae4ef22..9611ffcf867 100644 --- a/resources/css/elements/tables.css +++ b/resources/css/elements/tables.css @@ -163,6 +163,41 @@ } } +.widget-table { + @apply w-full max-w-full outline-hidden min-w-full overflow-x-auto text-start; + + thead { + th { + @apply text-sm font-medium text-start; + @apply p-0.75; + } + + th[data-column="date"], + th[data-column="datestamp"] { + @apply text-end; + } + } + + tbody { + @apply text-sm; + + tr { + td { + @apply p-0.75 text-sm; + } + + } + + .type-column { + @apply text-end; + } + } + + .date-index-field { + @apply whitespace-nowrap; + } +} + .table-drag-handle { @apply h-full cursor-grab hover:bg-gray-100 dark:hover:bg-gray-700 dark:opacity-75; background-image: url('../../svg/drag-dots.svg'); diff --git a/resources/js/components/entries/CollectionWidget.vue b/resources/js/components/entries/CollectionWidget.vue index cfb229a6af7..c71793eadfa 100644 --- a/resources/js/components/entries/CollectionWidget.vue +++ b/resources/js/components/entries/CollectionWidget.vue @@ -15,22 +15,16 @@ import { Link } from '@inertiajs/vue3'; const props = defineProps({ additionalColumns: Array, collection: String, - icon: String, + icon: String, title: String, listingUrl: String, - initialPerPage: { - type: Number, - default: 5, - }, - initialSortColumn: { - type: String, - }, - initialSortDirection: { - type: String, - }, + initialPerPage: { type: Number, default: 5 }, + initialSortColumn: { type: String }, + initialSortDirection: { type: String }, canCreate: Boolean, createLabel: String, blueprints: Array, + showTableHeader: { type: Boolean, default: false }, }); const requestUrl = cp_url(`collections/${props.collection}/entries`); @@ -72,8 +66,8 @@ function formatDate(value) { {{ __('There are no entries in this collection') }}