-
-
Notifications
You must be signed in to change notification settings - Fork 429
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
262 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<script lang="ts"> | ||
export let iconSize: number; | ||
</script> | ||
|
||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width={iconSize || 16} | ||
height={iconSize || 16} | ||
viewBox="0 0 242 256" | ||
><g clip-path="url(#a)" | ||
><mask | ||
id="b" | ||
width="242" | ||
height="256" | ||
x="0" | ||
y="0" | ||
maskUnits="userSpaceOnUse" | ||
style="mask-type:luminance"><path fill="#fff" d="M0 0h242v256H0V0Z" /></mask | ||
><g mask="url(#b)" | ||
><path | ||
fill="url(#c)" | ||
d="m241 43-9 136L149 0l92 43Zm-58 176-62 36-63-36 12-31h101l12 31ZM121 68l32 80H88l33-80ZM9 179 0 43 92 0 9 179Z" | ||
/><path | ||
fill="url(#d)" | ||
d="m241 43-9 136L149 0l92 43Zm-58 176-62 36-63-36 12-31h101l12 31ZM121 68l32 80H88l33-80ZM9 179 0 43 92 0 9 179Z" | ||
/></g | ||
></g | ||
><defs | ||
><linearGradient id="c" x1="53.2" x2="245" y1="231.9" y2="140.7" gradientUnits="userSpaceOnUse" | ||
><stop stop-color="#E40035" /><stop offset=".2" stop-color="#F60A48" /><stop | ||
offset=".4" | ||
stop-color="#F20755" | ||
/><stop offset=".5" stop-color="#DC087D" /><stop offset=".7" stop-color="#9717E7" /><stop | ||
offset="1" | ||
stop-color="#6C00F5" | ||
/></linearGradient | ||
> | ||
<linearGradient id="d" x1="44.5" x2="170" y1="30.7" y2="174" gradientUnits="userSpaceOnUse"> | ||
<stop stop-color="#FF31D9" /><stop | ||
offset="1" | ||
stop-color="#FF5BE1" | ||
stop-opacity="0" | ||
/></linearGradient | ||
><clipPath id="a"><path fill="#fff" d="M0 0h242v256H0z" /></clipPath></defs | ||
></svg | ||
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
export function generateAngularComponent(svgContent: string, componentName: string): string { | ||
const updatedSvgContent = svgContent.replace( | ||
/<svg([^>]*)>/, | ||
`<svg$1 [attr.width]="size.width" [attr.height]="size.height">` | ||
); | ||
|
||
return ` | ||
/** | ||
* ------------------------------------------------------------------------- | ||
* This Angular standalone component was generated by svgl.app | ||
* 🧩 A beautiful library with SVG logos | ||
* ------------------------------------------------------------------------- | ||
*/ | ||
import { Component, Input } from '@angular/core'; | ||
@Component({ | ||
selector: 'svg-${componentName}', | ||
standalone: true, | ||
template: \` | ||
${updatedSvgContent.trim()} | ||
\`, | ||
}) | ||
export class ${componentName}Component { | ||
@Input({ required: true }) size: { width: number; height: number }; | ||
} | ||
`; | ||
} |
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.