@atlaskit/spotlight
Version:
A spotlight introduces users to points of interest, from focused messages to multi-step tours.
24 lines • 837 B
JavaScript
/* index.tsx generated by @compiled/babel-plugin v3.0.2 */
import * as React from 'react';
import { ax, ix } from "@compiled/react/runtime";
import { forwardRef, useContext } from 'react';
import Heading from '@atlaskit/heading/heading';
import { SpotlightContext } from '../../controllers/context';
/**
* __SpotlightHeadline__
*
* `SpotlightHeadline` is required in a `Spotlight`. The content should be brief and direct to quickly hook the user on the intent.
*
*/
export var SpotlightHeadline = /*#__PURE__*/forwardRef(function (_ref, ref) {
var children = _ref.children,
testId = _ref.testId;
var _useContext = useContext(SpotlightContext),
heading = _useContext.heading;
return /*#__PURE__*/React.createElement(Heading, {
id: heading.id,
ref: ref,
testId: testId,
size: "xsmall"
}, children);
});