mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 18:05:11 +03:00
* feat: add new Icons package * Create README.md * add more icons * add "Home" icon and "Postgres" icon * reduce helpers * remove old files * make dev deps * Delete package-lock.json * Update README.md * add to packages for other apps * remove from db.design * Update README.md * Move the build-icons package in the packages folder. --------- Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
26 lines
803 B
JavaScript
26 lines
803 B
JavaScript
/* eslint-disable import/no-extraneous-dependencies */
|
|
import { base64SVG } from '@supabase/build-icons'
|
|
|
|
export default ({ componentName, iconName, children, getSvg, deprecated }) => {
|
|
const svgContents = getSvg()
|
|
const svgBase64 = base64SVG(svgContents)
|
|
|
|
return `
|
|
import createSupabaseIcon from '../createSupabaseIcon';
|
|
|
|
/**
|
|
* @component @name ${componentName}
|
|
* @description Supabase SVG icon component, renders SVG Element with children.
|
|
*
|
|
* @preview 
|
|
*
|
|
* @param {Object} props - Supabase icons props and any valid SVG attribute
|
|
* @returns {JSX.Element} JSX Element
|
|
* ${deprecated ? '@deprecated' : ''}
|
|
*/
|
|
const ${componentName} = createSupabaseIcon('${componentName}', ${JSON.stringify(children)});
|
|
|
|
export default ${componentName};
|
|
`
|
|
}
|