Updated
This commit is contained in:
parent
8197905483
commit
efc045bebd
48 changed files with 779 additions and 1140 deletions
51
@dasig/components/Display.astro
Normal file
51
@dasig/components/Display.astro
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
---
|
||||
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 '/src/styles/breakpoints.sass'
|
||||
</style>
|
||||
Loading…
Add table
Add a link
Reference in a new issue