@primer/react
Version:
An implementation of GitHub's Primer Design System using React
17 lines (13 loc) • 457 B
JavaScript
var constants = require('../constants.js');
const COMMON_PROP_NAMES = new Set(Object.keys(constants.COMMON));
const TYPOGRAPHY_PROP_NAMES = new Set(Object.keys(constants.TYPOGRAPHY));
const includesSystemProps = props => {
if (props.sx) {
return true;
}
return Object.keys(props).some(prop => {
return TYPOGRAPHY_PROP_NAMES.has(prop) || COMMON_PROP_NAMES.has(prop);
});
};
exports.includesSystemProps = includesSystemProps;
;