1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 06:43:35 +00:00

Fix strict typescript for Component Library stories (#12423)

Fixing some low hanging fruits for moving CL to strict typescript.

This primarily removes the types from args since TS infers them differently. We previously needed them since storybook would use any for args but now provides proper typings
This commit is contained in:
Oscar Hinton
2025-01-07 17:28:35 +01:00
committed by GitHub
parent c0d3fe15d1
commit 9ca3d0653d
7 changed files with 18 additions and 32 deletions

View File

@@ -1,5 +1,3 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { Meta, StoryObj } from "@storybook/angular";
import { ButtonComponent } from "./button.component";
@@ -107,13 +105,13 @@ export const DisabledWithAttribute: Story = {
};
export const Block: Story = {
render: (args: ButtonComponent) => ({
render: (args) => ({
props: args,
template: `
<span class="tw-flex">
<button bitButton [buttonType]="buttonType" [block]="block">[block]="true" Button</button>
<a bitButton [buttonType]="buttonType" [block]="block" href="#" class="tw-ml-2">[block]="true" Link</a>
<button bitButton [buttonType]="buttonType" block class="tw-ml-2">block Button</button>
<a bitButton [buttonType]="buttonType" block href="#" class="tw-ml-2">block Link</a>
</span>