UNPKG

@atlaskit/flag

Version:

A flag is used for confirmations, alerts, and acknowledgments that require minimal user interaction, often displayed using a flag group.

19 lines (18 loc) 583 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.useFlags = useFlags; var _react = require("react"); var _flagContext = require("./flag-context"); /** * useFlags is used to access the `showFlags` function which can be used to programmatically display flags. * - [Examples](https://atlassian.design/components/flag/flags-provider/examples#using-showflags) */ function useFlags() { var api = (0, _react.useContext)(_flagContext.FlagContext); if (api == null) { throw new Error('Unable to find FlagProviderContext'); } return api; }