1 line
20 KiB
JSON
1 line
20 KiB
JSON
|
{"ast":null,"code":"import _slicedToArray from \"/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/slicedToArray\";\n\nvar _this = this,\n _jsxFileName = \"/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/src/components/IconsDemo.js\";\n\nimport React, { useEffect, useState } from 'react';\nimport axios from 'axios';\nimport { InputText } from 'primereact/inputtext';\nimport { CodeHighlight } from './CodeHighlight';\n\nvar IconsDemo = function IconsDemo() {\n var _useState = useState([]),\n _useState2 = _slicedToArray(_useState, 2),\n icons = _useState2[0],\n setIcons = _useState2[1];\n\n var _useState3 = useState([]),\n _useState4 = _slicedToArray(_useState3, 2),\n filteredIcons = _useState4[0],\n setFilteredIcons = _useState4[1];\n\n useEffect(function () {\n axios.get('assets/demo/data/icons.json').then(function (res) {\n var icons = res.data.icons;\n icons.sort(function (icon1, icon2) {\n if (icon1.properties.name < icon2.properties.name) return -1;else if (icon1.properties.name < icon2.properties.name) return 1;else return 0;\n });\n setIcons(icons);\n setFilteredIcons(icons);\n });\n }, []);\n\n var onFilter = function onFilter(event) {\n if (!event.target.value) {\n setFilteredIcons(icons);\n } else {\n setFilteredIcons(icons.filter(function (it) {\n return it.icon.tags[0].includes(event.target.value);\n }));\n }\n };\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"card docs\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 9\n }\n }, /*#__PURE__*/React.createElement(\"h4\", {\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40,\n columnNumber: 13\n }\n }, \"Icons\"), /*#__PURE__*/React.createElement(\"p\", {\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 13\n }\n }, \"PrimeReact components internally use \", /*#__PURE__*/React.createElement(\"a\", {\n href: \"https://github.com/primefaces/primeicons\",\n className: \"font-medium\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 53\n }\n }, \"PrimeIcons\"), \" library, the official icons suite from \", /*#__PURE__*/React.createElement(\"a\", {\n href: \"https://www.primetek.com.tr\",\n className: \"font-medium\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 182\n }\n }, \"PrimeTek\"), \".\"), /*#__PURE__*/React.createElement(\"h5\", {\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 13\n }\n }, \"Download\"), /*#__PURE__*/React.createElement(\"p\", {\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 44,\n columnNumber: 13\n }\n }, \"PrimeIcons is available at npm, run the following command to download it to your project.\"), /*#__PURE__*/React.createElement(CodeHighlight, {\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 1\n }\n }, \"\\nnpm install primeicons --save\\n\"), /*#__PURE__*/React.createElement(\"h5\", {\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 13\n }\n }, \"Getting Started\"), /*#__PURE__*/React.createElement(\"p\", {\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 13\n }\n }, \"PrimeIcons use the \", /*#__PURE__*/React.createElement(\"strong\", {\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 35\n }\n }, \"pi pi-{icon}\"), \" syntax such as \", /*#__PURE__*/React.createElement(\"s
|