kenny
kenny

Reputation: 22364

With ASP.NET Blazor and Blazorise, how do I use that to show content only on mobile?

Same question w/o an answer I like.... and since the following allows me to show the contents of Container only on desktopy env.

    <Container Display="Display.None.Block.OnFullHD">
        <AppHelpMenu />
    </Container>

How do I use that to show a Container only on mobile?

    <Container Display="Display.None.Block.Mobile">
        <AppHelpMenu />
    </Container>

That doesn't work :(

Upvotes: 1

Views: 383

Answers (2)

Mladen Macanović
Mladen Macanović

Reputation: 1194

Should be

<Container Display="Display.None.OnFullHD.None.OnTablet.Block.OnMobile">
    <NavHelp />
</Container>

First, you define how to show it (None), and then where to show it (OnMobile).

Upvotes: 2

kenny
kenny

Reputation: 22364

The following CSS works good enough

@media (min-width: 641px) {
    .show-mobile-only {
        /* don't show on mobile */
        display: none;
    }
<div class="show-mobile-only" >
    <NavHelp />
</div>

Upvotes: 0

Related Questions