UNPKG

@atlaskit/navigation-system

Version:

The latest navigation system for Atlassian apps.

14 lines • 633 B
import _extends from "@babel/runtime/helpers/extends"; import React, { forwardRef } from 'react'; import AkButton from '@atlaskit/button/default/button'; import { useHasCustomTheme } from './has-custom-theme-context'; import { ThemedButton } from './themed-button'; // Explicitly typed to use only the themed button API, // which is a subset of the normal button API export const Button = /*#__PURE__*/forwardRef((props, ref) => { const hasCustomTheme = useHasCustomTheme(); const Component = hasCustomTheme ? ThemedButton : AkButton; return /*#__PURE__*/React.createElement(Component, _extends({ ref: ref }, props)); });