UNPKG

@atlaskit/avatar

Version:

An avatar is a visual representation of a user or entity.

18 lines 464 B
import { createContext, useContext } from '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> * ``` */ export var AvatarContext = /*#__PURE__*/createContext(undefined); export var useAvatarContext = function useAvatarContext() { return useContext(AvatarContext); };