@react-md/app-bar
Version:
This small package implments the AppBar spec in material design.
27 lines • 1.14 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.useActionClassName = void 0;
var classnames_1 = __importDefault(require("classnames"));
var utils_1 = require("@react-md/utils");
var useInheritContext_1 = require("./useInheritContext");
var block = (0, utils_1.bem)("rmd-app-bar");
/**
* This is a hook that will apply the nav classnames to an element. This should
* really not be used externally and is really just for creating dropdown menus
* within app bars that have the action styles.
*
* @internal
*/
function useActionClassName(_a) {
var _b = _a === void 0 ? {} : _a, first = _b.first, last = _b.last, inheritColor = _b.inheritColor, className = _b.className;
return (0, classnames_1.default)(block("action", {
first: first,
last: last,
inherit: (0, useInheritContext_1.useInheritContext)(inheritColor),
}), className);
}
exports.useActionClassName = useActionClassName;
//# sourceMappingURL=useActionClassName.js.map