refac: swtich

This commit is contained in:
Timothy Jaeryang Baek 2025-10-26 19:25:38 -07:00
parent ed6449d35f
commit 54c05ac6e0

View file

@ -15,7 +15,13 @@
</script>
<Tooltip
content={tooltip ? (state ? $i18n.t('Enabled') : $i18n.t('Disabled')) : ''}
content={typeof tooltip === 'string'
? tooltip
: typeof tooltip === 'boolean' && tooltip
? state
? $i18n.t('Enabled')
: $i18n.t('Disabled')
: ''}
placement="top"
>
<Switch.Root