Skip to content

Commit

Permalink
Merge pull request #52 from api3dao/51-add-new-logos-to-beta-logos-pa…
Browse files Browse the repository at this point in the history
…ckage

51 add new logos to beta logos package
  • Loading branch information
hiletmis authored Dec 8, 2023
2 parents 44cb8ad + c587e08 commit 87efff3
Show file tree
Hide file tree
Showing 12 changed files with 173 additions and 40 deletions.
13 changes: 6 additions & 7 deletions helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function sanitizeName(name, suffix = '', prefix = '') {
function generateSwitchCase(array, prefix) {
return array
.map(
(item) => `case "${sanitizeName(item)}":\n\treturn <${prefix}${sanitizeName(item, 'Logo')} {...props} />;\n`
(item) => `case "${sanitizeName(item).toLowerCase()}":\n\treturn <${prefix}${sanitizeName(item, 'Logo')} {...props} />;\n`
)
.join('');
}
Expand Down Expand Up @@ -72,7 +72,7 @@ function generateFunction(batchName, switchCase, mode) {
return ${getPlaceholder(mode)}
}
switch (sanitizeName(props.id)) {
switch (sanitizeName(props.id).toLowerCase()) {
${switchCase}
default:
return ${getPlaceholder(mode)}
Expand All @@ -84,11 +84,10 @@ function generateFunction(batchName, switchCase, mode) {
}

function generateSvgFunction(batchName, format) {
return `${
format === 'esm'
? `import ${batchName} from './${batchName}.js';\n`
: `const ${batchName} = require('./${batchName}.js');\n`
}
return `${format === 'esm'
? `import ${batchName} from './${batchName}.js';\n`
: `const ${batchName} = require('./${batchName}.js');\n`
}
function ${batchName}Svg(id) {
return "data:image/svg+xml; base64," + btoa(renderToString(${batchName}({ id: id })));
Expand Down
37 changes: 37 additions & 0 deletions raw/symbols/baba.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions raw/symbols/et-hx.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions raw/symbols/mati-cx.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions raw/symbols/matic-exchange-rate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions raw/symbols/ng.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions raw/symbols/pypl.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions raw/symbols/pyth.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions raw/symbols/qqq.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 87efff3

Please sign in to comment.