UNPKG

matcha-keystone-utils

Version:

Useful features for Keystone 6: validators, fields, componentBlocks...

14 lines (13 loc) 588 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Cell = void 0; const react_1 = __importDefault(require("react")); const components_1 = require("@keystone-6/core/admin-ui/components"); const Cell = ({ item, field }) => { const value = item[field.path]; return (value && react_1.default.createElement(components_1.CellLink, { href: value, target: "_blank" }, `➡️ Go to link`)); }; exports.Cell = Cell;