Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

Add "missing" tailwind mappings for fieldtype width #2516

Open
FrittenKeeZ opened this issue May 12, 2020 · 0 comments
Open

Add "missing" tailwind mappings for fieldtype width #2516

FrittenKeeZ opened this issue May 12, 2020 · 0 comments

Comments

@FrittenKeeZ
Copy link

In order to better layout fields, please add the "missing" tailwind classes to the mappings.

global.tailwind_width_class = function (width) {
    const widths = {
        17: '1/6',
        20: '1/5',
        25: '1/4',
        33: '1/3',
        40: '2/5',
        50: '1/2',
        60: '3/5',
        66: '2/3',
        75: '3/4',
        80: '4/5',
        83: '5/6',
        100: 'full'
    };

    return `w-${widths[width] || 'full'}`;
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant