feat: rename button components to include button in name for consistency
This commit is contained in:
28
src/components/buttons/GoBackButton.astro
Normal file
28
src/components/buttons/GoBackButton.astro
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
import Icon from '@components/ui/icons/icon.astro';
|
||||
|
||||
interface Props {
|
||||
noArrow?: boolean;
|
||||
}
|
||||
|
||||
const { noArrow } = Astro.props;
|
||||
---
|
||||
|
||||
<button
|
||||
class="button-base button-bg-blue group inline-flex rounded-lg gap-x-2"
|
||||
id="back-button"
|
||||
data-astro-prefetch
|
||||
>
|
||||
<div class="button-text-title flex relative items-center text-center">
|
||||
{noArrow ? null : <Icon name="arrowLeft" />}
|
||||
<span class="ml-2">
|
||||
Go Back
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<script>
|
||||
document.getElementById('back-button')?.addEventListener('click', () => {
|
||||
window.history.back();
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user