@atlaskit/eslint-plugin-design-system
Version:
The essential plugin for use with the Atlassian Design System.
17 lines (16 loc) • 519 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.findFontFamilyTokenForValue = findFontFamilyTokenForValue;
function findFontFamilyTokenForValue(value) {
if (/charlie[\s-]?display/i.test(value)) {
return 'font.family.brand.heading';
} else if (/charlie[\s-]?text/i.test(value)) {
return 'font.family.brand.body';
} else if (/sans[\s-]?serif/i.test(value)) {
return 'font.family.body';
} else if (/monospace/i.test(value)) {
return 'font.family.code';
}
}