UNPKG

@inkline/inkline

Version:

Inkline is the Vue.js UI/UX Library built for creating your next design system

18 lines (15 loc) 538 B
import { toDashCase } from './toDashCase'; /** * Convert given class name into dash case and append the given breakpoint string. Required in order to turn camel case * props into dash case. * * @param className * @param breakpoint * @returns {string} */ export function breakpointClass (className: string, breakpoint: string | number): string { if (['string', 'number'].indexOf(typeof breakpoint) > -1 && breakpoint !== '') { return `${toDashCase(className)}-${breakpoint}`; } return toDashCase(className); }