Skip to content

Commit

Permalink
Added MainPage to StoryBook
Browse files Browse the repository at this point in the history
  • Loading branch information
dyatlov-a committed Oct 21, 2024
1 parent 3fc575b commit a598781
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 32 deletions.
9 changes: 9 additions & 0 deletions src/Inc.TeamAssistant.Stories/Features/Main.stories.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@attribute [Stories("Features/Main")]

<Stories TComponent="RouterLink">
<Story Name="Default">
<Template>
<Main MoveToConstructor="() => { }"></Main>
</Template>
</Story>
</Stories>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,4 @@
<ItemGroup>
<ProjectReference Include="..\Inc.TeamAssistant.WebUI\Inc.TeamAssistant.WebUI.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Features\" />
</ItemGroup>
</Project>
3 changes: 2 additions & 1 deletion src/Inc.TeamAssistant.Stories/_Imports.razor
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
@using Inc.TeamAssistant.WebUI.Components
@using Inc.TeamAssistant.WebUI.Services.ClientCore
@using Inc.TeamAssistant.WebUI.Icons
@using Inc.TeamAssistant.WebUI.Components.Notifications
@using Inc.TeamAssistant.WebUI.Components.Notifications
@using Inc.TeamAssistant.WebUI.Features.Main
37 changes: 37 additions & 0 deletions src/Inc.TeamAssistant.WebUI/Features/Main/Main.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
@inject IRenderContext RenderContext
@inject IStringLocalizer<MainResources> Localizer

<MainVideo FileName="source-tree-02" />

<section id="about-bots" class="about-bots">
<div class="about-bots__container @(RenderContext.IsBrowser ? "animation__slide-left" : "hidden")">
<h1 class="about-bots__header">
<span>@Localizer["MainHeader"]</span>
<br/>
<span>@Localizer["MainSubHeader"]</span>
</h1>
<br/>
<p class="about-bots__description">
<span>@Icons.Ok @Localizer["ToolAppraiser"]</span>
<br/>
<span>@Icons.Accept @Localizer["ToolReviewer"]</span>
<br/>
<span>@Icons.Comment @Localizer["ToolRandomCoffee"]</span>
<br/>
<span>@Icons.Start @Localizer["ToolCheckIn"]</span>
</p>
<div class="about-bots__actions">
<Button ComponentStyle="ComponentStyle.Secondary" OnClick="MoveToConstructor">
@Localizer["CreateBotLink"]
</Button>
</div>
</div>
</section>

@code {
/// <summary>
/// MoveToConstructor event.
/// </summary>
[Parameter, EditorRequired]
public EventCallback MoveToConstructor { get; set; }
}
29 changes: 1 addition & 28 deletions src/Inc.TeamAssistant.WebUI/Features/Main/MainPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,11 @@
@page "/en"
@page "/ru"

@inject IRenderContext RenderContext
@inject IStringLocalizer<MainResources> Localizer
@inject NavRouter NavRouter

<MetaDataModule />

<MainVideo FileName="source-tree-02" />

<section id="about-bots" class="about-bots">
<div class="about-bots__container @(RenderContext.IsBrowser ? "animation__slide-left" : "hidden")">
<h1 class="about-bots__header">
<span>@Localizer["MainHeader"]</span>
<br/>
<span>@Localizer["MainSubHeader"]</span>
</h1>
<br/>
<p class="about-bots__description">
<span>@Icons.Ok @Localizer["ToolAppraiser"]</span>
<br/>
<span>@Icons.Accept @Localizer["ToolReviewer"]</span>
<br/>
<span>@Icons.Comment @Localizer["ToolRandomCoffee"]</span>
<br/>
<span>@Icons.Start @Localizer["ToolCheckIn"]</span>
</p>
<div class="about-bots__actions">
<Button ComponentStyle="ComponentStyle.Secondary" OnClick="MoveToConstructor">
@Localizer["CreateBotLink"]
</Button>
</div>
</div>
</section>
<Main MoveToConstructor="MoveToConstructor"></Main>

@code {
private Task MoveToConstructor() => NavRouter.MoveToRoute("constructor");
Expand Down

0 comments on commit a598781

Please sign in to comment.