Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add application and application header #40

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ public partial class Index

### Supported Components

- [Application](#application) **(since 0.4.8)**
- [Application Header](#application-header) **(since 0.4.8)**
- [Basic Navigation](#basic-navigation)
- [Navigation Menu](#navigation-menu)
- [About and Legal](#about-and-legal)
Expand Down Expand Up @@ -149,6 +151,65 @@ public partial class Index
- [Form Validation](#form-validation)
- [Workflow](#workflow)

## Application
```razor
<Application @ref="_app">
<ApplicationHeader Name="My Application">
<placeholder-logo slot="logo"></placeholder-logo>
</ApplicationHeader>
<Menu>
<MenuItem>Item 1</MenuItem>
<MenuItem>Item 2</MenuItem>
</Menu>

<ix-content>
<ContentHeader
Slot="header"
HeaderTitle="My Content Page"
>
</ContentHeader>
</ix-content>
</Application>
```

```csharp
Application _app;

// Set the app switch config when the component is rendered.
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if(firstRender)
{
AppSwitchConfig config = new()
{
CurrentAppId = "1",
Apps =
[
new App()
{
Id = "App1",
Name = "App 1",
Description = "Awesome app",
Url = "app1",
Target = "_self",
IconSrc = "..."
}
]
}

_app.AppSwitchConfig = config;
}
}
```

## Application Header

```razor
<ApplicationHeader Name="My Application">
<placeholder-logo slot="logo"></placeholder-logo>
</ApplicationHeader>
```

## Basic Navigation

```razor
Expand Down
Loading