aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2025-04-13 13:00:43 +0200
committerAriel Costas Guerrero <ariel@costas.dev>2025-04-13 13:00:43 +0200
commite96af5ce5e8dd00cf8a31d4812f416583defa449 (patch)
treead5c27baf17637929b8cdeabbc6c60b6f4569fb6 /src/components
parent56f6a63ff90d6ad648b99c2d0eea7dd4cd6f888a (diff)
New article, fix sass
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Alert.astro57
1 files changed, 0 insertions, 57 deletions
diff --git a/src/components/Alert.astro b/src/components/Alert.astro
deleted file mode 100644
index 0cb5fa2..0000000
--- a/src/components/Alert.astro
+++ /dev/null
@@ -1,57 +0,0 @@
----
-import { Icon } from "astro-icon/components";
-
-interface Props {
- type: "note" | "warning";
-}
-
-const { type } = Astro.props;
-
-const icon = {
- note: "ph:info",
- warning: "ph:warning",
-}[type];
----
-
-<div role="alert" class={type}>
- <Icon name={icon} />
- <slot />
-</div>
-
-<style lang="scss" is:global>
- @use "../../styles/shared.scss" as *;
-
- div[role="alert"] {
- display: flex;
- align-items: center;
- justify-content: flex-start;
-
- padding: 1rem;
- margin-block: 1rem;
- border-radius: 0.5rem;
-
- &.note {
- background-color: $noteBackground;
- color: $noteText;
- box-shadow: 0 0 0 1px $noteText;
- }
-
- &.warning {
- background-color: $warningBackground;
- color: $warningText;
- box-shadow: 0 0 0 1px $warningText;
- }
- }
-
- div[role="alert"] svg {
- width: 1.5em;
- height: 1.5em;
- margin-inline-end: 0.5rem;
- color: inherit;
- vertical-align: middle;
- }
-
- div[role="alert"] p {
- margin-block: 0;
- }
-</style>