@intility/bifrost-react
Version:
React library for Intility's design system, Bifrost.
28 lines • 699 B
JavaScript
import { c as _c } from "react-compiler-runtime";
import { forwardRef } from "react";
import CheckboxCard from "../CheckboxCard/CheckboxCard.js";
import { jsx as _jsx } from "react/jsx-runtime";
/**
* Alias for `<CheckboxCard type="switch">`
*
* @see https://bifrost.intility.com/react/switchcard
*/
const SwitchCard = /*#__PURE__*/forwardRef((props, ref) => {
const $ = _c(3);
let t0;
if ($[0] !== props || $[1] !== ref) {
t0 = /*#__PURE__*/_jsx(CheckboxCard, {
...props,
ref: ref,
type: "switch"
});
$[0] = props;
$[1] = ref;
$[2] = t0;
} else {
t0 = $[2];
}
return t0;
});
SwitchCard.displayName = "SwitchCard";
export default SwitchCard;