dasig-static/@dasig/components/Display.astro
2026-03-26 19:08:50 +08:00

51 lines
845 B
Text

---
interface Props {
desktop?: boolean
tablet?: boolean
mobile?: boolean
}
const { desktop, tablet, mobile } = Astro.props
---
{
desktop && !tablet && !mobile && (
<div class="on-desktop-only">
<slot />
</div>
)
}{
!desktop && tablet && !mobile && (
<div class="on-tablet-only">
<slot />
</div>
)
}{
!desktop && !tablet && mobile && (
<div class="on-mobile-only">
<slot />
</div>
)
}{
desktop && tablet && !mobile && (
<div class="on-desktop-tablet-only">
<slot />
</div>
)
}{
desktop && !tablet && mobile && (
<div class="on-desktop-mobile-only">
<slot />
</div>
)
}{
!desktop && tablet && mobile && (
<div class="on-tablet-mobile-only">
<slot />
</div>
)
}
<style lang="sass">
@use '../../design/breakpoints.sass'
</style>