Repository URL to install this package:
Version:
0.9.6 ▾
|
import { camelCase } from 'chain-able-boost'
import variables from './variables'
import {
desktopOrLarger,
tabletOrLarger,
phoneOrLarger,
desktopOrSmaller,
tabletOrSmaller,
phoneOrSmaller,
vw,
rem,
container,
row,
font,
qa,
} from './functions'
const remapped = { }
function remapKeys(key) {
const camelKey = camelCase(key)
remapped[camelKey] = variables[key]
// if required, add kebab as well
// but this is handled in spread exports
// remapped[key] = remapped[key]
}
Object.keys(variables).forEach(remapKeys)
const exporting = {
desktopOrLarger,
tabletOrLarger,
phoneOrLarger,
desktopOrSmaller,
tabletOrSmaller,
phoneOrSmaller,
vw,
rem,
container,
row,
font,
qa,
...variables,
// add these new names
remapped,
...remapped,
}
export default exporting