mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-02-11 14:20:07 +08:00
fix: Add loading and error icons to icon plugin import.
This commit is contained in:
parent
995fcdb020
commit
3c98732584
1
.gitignore
vendored
1
.gitignore
vendored
@ -20,6 +20,7 @@ packages/server/build/**
|
||||
.DS_Store
|
||||
|
||||
packages/build/src/test/writeFile.txt
|
||||
packages/build/build/**
|
||||
|
||||
packages/plugins/connections/connection-mongodb/mongod-*
|
||||
packages/plugins/connections/connection-mongodb/globalConfig.json
|
||||
|
@ -42,6 +42,12 @@ function buildIcons({ components }) {
|
||||
components.icons = [];
|
||||
Object.entries(iconPackages).forEach(([iconPackage, regex]) => {
|
||||
const icons = new Set();
|
||||
// TODO: Can we do better than this?
|
||||
// Add default icons
|
||||
if (iconPackage === 'react-icons/ai') {
|
||||
icons.add('AiOutlineLoading3Quarters');
|
||||
icons.add('AiOutlineExclamationCircle');
|
||||
}
|
||||
[...JSON.stringify(components.global || {}).matchAll(regex)].map((match) =>
|
||||
icons.add(match[1])
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user