Skip to content

Instantly share code, notes, and snippets.

View mrleblanc101's full-sized avatar

Sébastien LeBlanc mrleblanc101

View GitHub Profile
<script setup lang="ts">
import { twMerge } from 'tailwind-merge';
import { NuxtLink } from '#components';
type ButtonProps = {
prefixIcon?: string;
suffixIcon?: string;
iconClasses?: string;
size?: 'default' | 'small' | 'large';
rounded?: boolean;
<?php
namespace App\Forms\Components;
use App\Models\DigitalProduct\Practice;
use App\Models\DigitalProduct\Product;
use Filament\Forms\Components\CheckboxList;
class PracticeMatrix extends CheckboxList
{
<?php
namespace App\Forms\Components;
use App\Models\DigitalProduct\Practice;
use App\Models\DigitalProduct\Product;
use Filament\Forms\Components\CheckboxList;
class PracticeMatrix extends CheckboxList
{
<?php
namespace App\Forms\Components;
use App\Models\DigitalProduct\Practice;
use App\Models\DigitalProduct\Product;
use Filament\Forms\Components\CheckboxList;
class PracticeMatrix extends CheckboxList
{

Columnize

Split an array into equal with objects

const columnize = (array, column, columns) => {
    const total = array.length;
    const perCol = Math.ceil(total / columns);
    let start = perCol * (column - 1);
 const end = perCol * column;