Skip to content

Commit

Permalink
Add getPositionClasses function to
Browse files Browse the repository at this point in the history
NotificationList component
  • Loading branch information
Michael-Liendo committed Nov 13, 2023
1 parent ad0baec commit dc9b653
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/lib/components/NotificationList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@
BottomRight = 'bottom_right',
BottomLeft = 'bottom_left',
}
export function getPositionClasses(position: Position = Position.TopRight) {
switch (position) {
case Position.TopRight:
return 'top-6 right-6';
case Position.TopLeft:
return 'top-6 left-6';
case Position.BottomRight:
return 'bottom-6 right-6';
case Position.BottomLeft:
return 'bottom-6 left-6';
default:
return 'top-6 right-6';
}
}
</script>

<script lang="ts">
Expand Down

0 comments on commit dc9b653

Please sign in to comment.