-
Notifications
You must be signed in to change notification settings - Fork 0
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
4 changed files
with
78 additions
and
37 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,40 @@ | ||
<script lang="ts"> | ||
export let id = ""; | ||
export let name = "Close"; | ||
export let size = "16px"; | ||
export let color = "currentColor"; | ||
export let rotate = 0; | ||
export let spin = false; | ||
export let style = ""; | ||
export let bordered = false; | ||
</script> | ||
|
||
<svg | ||
{id} | ||
width={size} | ||
height={size} | ||
fill={color} | ||
class:spin | ||
class:bordered | ||
style="transform: rotate({rotate}deg); --icon-size: {size}; {style}" | ||
> | ||
<use href="./assets/sprite.svg#{name}" /> | ||
</svg> | ||
|
||
<style> | ||
svg { | ||
flex: 0 0 var(--icon-size); | ||
} | ||
.spin { | ||
animation: spin 0.75s linear infinite; | ||
} | ||
.bordered { | ||
box-shadow: 0 0 0 1px var(--color-border); | ||
border-radius: 4px; | ||
} | ||
@keyframes spin { | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
</style> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.