-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SM-660] move sm-no-items to CL (#5059)
* refactor: move sm-no-items to CL * update and run prettier * apply code review
- Loading branch information
1 parent
2ad739b
commit 36de1c8
Showing
12 changed files
with
83 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
bitwarden_license/bit-web/src/app/secrets-manager/shared/no-items.component.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./no-items.module"; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Component } from "@angular/core"; | ||
|
||
import { Icons } from ".."; | ||
|
||
/** | ||
* Component for displaying a message when there are no items to display. Expects title, description and button slots. | ||
*/ | ||
@Component({ | ||
selector: "bit-no-items", | ||
templateUrl: "./no-items.component.html", | ||
}) | ||
export class NoItemsComponent { | ||
protected icon = Icons.Search; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { CommonModule } from "@angular/common"; | ||
import { NgModule } from "@angular/core"; | ||
|
||
import { IconModule } from "../icon"; | ||
|
||
import { NoItemsComponent } from "./no-items.component"; | ||
|
||
@NgModule({ | ||
imports: [CommonModule, IconModule], | ||
exports: [NoItemsComponent], | ||
declarations: [NoItemsComponent], | ||
}) | ||
export class NoItemsModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { Meta, moduleMetadata, Story } from "@storybook/angular"; | ||
|
||
import { ButtonModule } from "../button"; | ||
|
||
import { NoItemsModule } from "./no-items.module"; | ||
|
||
export default { | ||
title: "Component Library/No Items", | ||
decorators: [ | ||
moduleMetadata({ | ||
imports: [ButtonModule, NoItemsModule], | ||
}), | ||
], | ||
} as Meta; | ||
|
||
const Template: Story = (args) => ({ | ||
props: args, | ||
template: ` | ||
<bit-no-items class="tw-text-main"> | ||
<ng-container slot="title">No items found</ng-container> | ||
<ng-container slot="description">Your description here.</ng-container> | ||
<button | ||
slot="button" | ||
type="button" | ||
bitButton | ||
buttonType="secondary" | ||
> | ||
<i class="bwi bwi-plus" aria-hidden="true"></i> | ||
New item | ||
</button> | ||
</bit-no-items> | ||
`, | ||
}); | ||
|
||
export const Default = Template.bind({}); |