mirror of
https://github.com/bitwarden/browser
synced 2026-01-03 17:13:47 +00:00
* remove libs/angular dialog service; move simple dialog types to CL * update DialogServiceAbstraction imports to CL * update imports in libs/angular to use CL * colocate simple dialog types * move SimpleConfigurableDialog files under SimpleDialog * remove CL import alias from CL src * update imports * run prettier * convert SimpleDialog enums to types * replace DialogServiceAbstraction with DialogService * restrict libs/angular imports in CL * add deprecation note to ModalService * Delete BrowserDialogService * Remove ElectronDialogService * update browser and desktop services.module * remove os.EOL in simple dialog * change SimpleDialogCloseType to boolean * remove close type
43 lines
1.1 KiB
TypeScript
43 lines
1.1 KiB
TypeScript
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
|
|
import { Meta, StoryObj, moduleMetadata } from "@storybook/angular";
|
|
|
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
|
|
|
import { InputModule } from "../input/input.module";
|
|
import { SharedModule } from "../shared";
|
|
import { I18nMockService } from "../utils/i18n-mock.service";
|
|
|
|
import { SearchComponent } from "./search.component";
|
|
|
|
export default {
|
|
title: "Component Library/Form/Search",
|
|
component: SearchComponent,
|
|
decorators: [
|
|
moduleMetadata({
|
|
imports: [SharedModule, InputModule, FormsModule, ReactiveFormsModule],
|
|
providers: [
|
|
{
|
|
provide: I18nService,
|
|
useFactory: () => {
|
|
return new I18nMockService({
|
|
search: "Search",
|
|
});
|
|
},
|
|
},
|
|
],
|
|
}),
|
|
],
|
|
} as Meta;
|
|
|
|
type Story = StoryObj<SearchComponent>;
|
|
|
|
export const Default: Story = {
|
|
render: (args: SearchComponent) => ({
|
|
props: args,
|
|
template: `
|
|
<bit-search [(ngModel)]="searchText" [placeholder]="placeholder" [disabled]="disabled"></bit-search>
|
|
`,
|
|
}),
|
|
args: {},
|
|
};
|