@atlaskit/spotlight
Version:
A spotlight introduces users to points of interest, from focused messages to multi-step tours.
26 lines • 768 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 const SpotlightHeadline = /*#__PURE__*/forwardRef(({
children,
testId
}, ref) => {
const {
heading
} = useContext(SpotlightContext);
return /*#__PURE__*/React.createElement(Heading, {
id: heading.id,
ref: ref,
testId: testId,
size: "xsmall"
}, children);
});