UNPKG

@chayns-components/core

Version:

A set of beautiful React components for developing your own applications with chayns.

32 lines (31 loc) 930 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getParagraphFormat = exports.getDesignSettings = void 0; var _chaynsApi = require("chayns-api"); const getDesignSettings = async siteId => { let id = siteId; if (!id) id = (0, _chaynsApi.getSite)().id; const response = await fetch(`https://api.chayns.net/css/${id}/style/v2`, { method: 'GET' }); if (response.status === 200) { return await response.json(); } return undefined; }; exports.getDesignSettings = getDesignSettings; const getParagraphFormat = async siteId => { let id = siteId; if (!id) id = (0, _chaynsApi.getSite)().id; const response = await fetch(`https://api.chayns.net/css/${id}/paragraphFormat`, { method: 'GET' }); if (response.status === 200) { return await response.json(); } return undefined; }; exports.getParagraphFormat = getParagraphFormat; //# sourceMappingURL=get.js.map