@itwin/core-react
Version:
A react component library of iTwin.js UI general purpose components
25 lines • 1.13 kB
JavaScript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
* @module Utilities
*/
import * as React from "react";
import { BadgeType } from "./BadgeType.js";
import { TechnicalPreviewBadge } from "./TechnicalPreviewBadge.js";
import { NewBadge } from "./NewBadge.js";
import { DeprecatedBadge } from "./DeprecatedBadge.js";
/** Badge component that renders based on a badge type.
* @internal
*/
export function Badge({ type }) {
if (type === BadgeType.TechnicalPreview || type === "technical-preview")
return React.createElement(TechnicalPreviewBadge, null);
if (type === BadgeType.New || type === "new")
return React.createElement(NewBadge, null);
if (type === "deprecated")
return React.createElement(DeprecatedBadge, null);
return null;
}
//# sourceMappingURL=Badge.js.map