You've already forked AstralRinth
forked from didirus/AstralRinth
Envs v3 frontend (#4267)
* New envs frontend * lint fix * Add blog post, user-facing changes, dashboard warning, project page member warning, and migration reviewing. maybe some other misc stuff * lint * lint * ignore .data in .prettierignore * i18n as fuck * fix proj page * Improve news markdown rendering * improve phrasing of initial paragraph * Fix environments not reloading after save * index.ts instead of underscored name * shrink-0 back on these icons
This commit is contained in:
22
packages/ui/src/components/base/LargeRadioButton.vue
Normal file
22
packages/ui/src/components/base/LargeRadioButton.vue
Normal file
@@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<button
|
||||
class="px-4 py-3 text-left border-0 font-medium border-2 border-button-bg border-solid flex gap-2 transition-all cursor-pointer active:scale-[0.98] hover:bg-button-bg hover:brightness-[--hover-brightness] rounded-xl"
|
||||
:class="selected ? 'text-contrast bg-button-bg' : 'text-primary bg-transparent'"
|
||||
@click="emit('select')"
|
||||
>
|
||||
<RadioButtonCheckedIcon v-if="selected" class="text-brand h-5 w-5 shrink-0" />
|
||||
<RadioButtonIcon v-else class="h-5 w-5 shrink-0" />
|
||||
<slot />
|
||||
</button>
|
||||
</template>
|
||||
<script setup lang="ts" generic="T">
|
||||
import { RadioButtonCheckedIcon, RadioButtonIcon } from '@modrinth/assets'
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'select'): void
|
||||
}>()
|
||||
|
||||
defineProps<{
|
||||
selected: boolean
|
||||
}>()
|
||||
</script>
|
||||
Reference in New Issue
Block a user