@atlaskit/primitives
Version:
Primitives are token-backed low-level building blocks.
14 lines • 433 B
JavaScript
import { useContext } from 'react';
import { SurfaceContext } from './surface-context';
/**
* __useSurface__
*
* Return the current surface. If no parent sets a surface color it falls back to the default surface.
*
* @see SurfaceContext
*/
export var useSurface = function useSurface() {
return useContext(SurfaceContext);
};
SurfaceContext.displayName = 'SurfaceProvider';
export { SurfaceContext } from './surface-context';