mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
* Rename service-factory folder * Move cryptographic service factories * Move crypto models * Move crypto services * Move domain base class * Platform code owners * Move desktop log services * Move log files * Establish component library ownership * Move background listeners * Move background background * Move localization to Platform * Move browser alarms to Platform * Move browser state to Platform * Move CLI state to Platform * Move Desktop native concerns to Platform * Move flag and misc to Platform * Lint fixes * Move electron state to platform * Move web state to Platform * Move lib state to Platform * Fix broken tests * Rename interface to idiomatic TS * `npm run prettier` 🤖 * Resolve review feedback * Set platform as owners of web core and shared * Expand moved services * Fix test types --------- Co-authored-by: Hinton <hinton@users.noreply.github.com>
63 lines
1.7 KiB
TypeScript
63 lines
1.7 KiB
TypeScript
import { Meta, StoryObj, moduleMetadata } from "@storybook/angular";
|
|
|
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
|
|
|
import { MultiSelectComponent } from "../multi-select/multi-select.component";
|
|
import { I18nMockService } from "../utils/i18n-mock.service";
|
|
|
|
import { SelectComponent } from "./select.component";
|
|
import { SelectModule } from "./select.module";
|
|
|
|
export default {
|
|
title: "Component Library/Form/Select",
|
|
component: SelectComponent,
|
|
decorators: [
|
|
moduleMetadata({
|
|
imports: [SelectModule],
|
|
providers: [
|
|
{
|
|
provide: I18nService,
|
|
useFactory: () => {
|
|
return new I18nMockService({
|
|
selectPlaceholder: "-- Select --",
|
|
});
|
|
},
|
|
},
|
|
],
|
|
}),
|
|
],
|
|
args: {
|
|
disabled: false,
|
|
},
|
|
parameters: {
|
|
design: {
|
|
type: "figma",
|
|
url: "https://www.figma.com/file/3tWtMSYoLB0ZLEimLNzYsm/End-user-%26-admin-Vault-Refresh?t=7QEmGA69YTOF8sXU-0",
|
|
},
|
|
},
|
|
} as Meta;
|
|
|
|
type Story = StoryObj<MultiSelectComponent>;
|
|
|
|
export const Default: Story = {
|
|
render: (args) => ({
|
|
props: {
|
|
...args,
|
|
},
|
|
template: `<bit-select [disabled]="disabled">
|
|
<bit-option value="value1" label="Value 1" icon="bwi-collection"></bit-option>
|
|
<bit-option value="value2" label="Value 2" icon="bwi-collection"></bit-option>
|
|
<bit-option value="value3" label="Value 3" icon="bwi-collection"></bit-option>
|
|
<bit-option value="value4" label="Value 4" icon="bwi-collection" disabled></bit-option>
|
|
</bit-select>`,
|
|
}),
|
|
args: {},
|
|
};
|
|
|
|
export const Disabled: Story = {
|
|
...Default,
|
|
args: {
|
|
disabled: true,
|
|
},
|
|
};
|