How to use the laravel-nova.CardSizes.indexOf function in laravel-nova

To help you get started, we’ve selected a few laravel-nova examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github swisnl / laravel-nova-mirror / resources / js / components / CardWrapper.vue View on Github external
function calculateCardWidth(card) {
    // If the card's width is found in the accepted sizes return that class,
    // or return the default 1/3 class
    return CardSizes.indexOf(card.width) !== -1 ? `w-${card.width}` : 'w-1/3'
}

laravel-nova

Supporting modules for Laravel Nova

MIT
Latest version published 3 years ago

Package Health Score

42 / 100
Full package analysis