@atlaskit/avatar
Version:
An avatar is a visual representation of a user or entity.
24 lines (23 loc) • 644 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.useAvatarContext = exports.AvatarContext = void 0;
var _react = require("react");
/**
* __Avatar context__
*
* This allows setting the size of all avatars under a context provider.
*
* ```tsx
* <AvatarContext.Provider value={{ size: 'small' }}>
* <Avatar
* // ...props
* />
* </AvatarContext.Provider>
* ```
*/
var AvatarContext = exports.AvatarContext = /*#__PURE__*/(0, _react.createContext)(undefined);
var useAvatarContext = exports.useAvatarContext = function useAvatarContext() {
return (0, _react.useContext)(AvatarContext);
};