UNPKG

sanity-plugin-seo-tools

Version:

> Upgrading from V2 to V3 is a breaking change. The `seo-tools` input has been replaced by a SEO pane which needs to be set-up using a custom desk structure as per the installation guide. Secondly, the previously automatically provided fields (focus keywo

47 lines (46 loc) 1.26 kB
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } function _templateObject() { var data = _taggedTemplateLiteral([ "\n border-radius: 9999px;\n margin-top: .4rem;\n width: .8rem;\n height: .8rem;\n" ]); _templateObject = function _templateObject() { return data; }; return data; } import React, { useMemo } from "react"; import styled from "styled-components"; import { Box } from "@sanity/ui"; var StyledBubbleBox = styled(Box)(_templateObject()); export var SeoRatingBubble = function(param) { var rating = param.rating; var color = useMemo(function() { switch(rating){ case "good": return "#7ad03a"; case "ok": return "#ee7c1b"; case "bad": return "#dc3232"; default: return "#888"; } }, [ rating ]); return /*#__PURE__*/ React.createElement(StyledBubbleBox, { style: { backgroundColor: color } }); }; //# sourceMappingURL=SeoRatingBubble.js.map