mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 05:43:41 +00:00
[CL-925] add filled danger button (#17633)
* add dangerPrimary button variant * add dangerPrimary to small story
This commit is contained in:
@@ -54,6 +54,14 @@ const buttonStyles: Record<ButtonType, string[]> = {
|
|||||||
"hover:!tw-text-contrast",
|
"hover:!tw-text-contrast",
|
||||||
...focusRing,
|
...focusRing,
|
||||||
],
|
],
|
||||||
|
dangerPrimary: [
|
||||||
|
"tw-border-danger-600",
|
||||||
|
"tw-bg-danger-600",
|
||||||
|
"!tw-text-contrast",
|
||||||
|
"hover:tw-bg-danger-700",
|
||||||
|
"hover:tw-border-danger-700",
|
||||||
|
...focusRing,
|
||||||
|
],
|
||||||
unstyled: [],
|
unstyled: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,13 @@ export const Primary: Story = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const DangerPrimary: Story = {
|
||||||
|
...Default,
|
||||||
|
args: {
|
||||||
|
buttonType: "dangerPrimary",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
export const Danger: Story = {
|
export const Danger: Story = {
|
||||||
...Default,
|
...Default,
|
||||||
args: {
|
args: {
|
||||||
@@ -77,6 +84,7 @@ export const Small: Story = {
|
|||||||
<button type="button" bitButton [disabled]="disabled" [loading]="loading" [buttonType]="'primary'" [size]="size" [block]="block">Primary small</button>
|
<button type="button" bitButton [disabled]="disabled" [loading]="loading" [buttonType]="'primary'" [size]="size" [block]="block">Primary small</button>
|
||||||
<button type="button" bitButton [disabled]="disabled" [loading]="loading" [buttonType]="'secondary'" [size]="size" [block]="block">Secondary small</button>
|
<button type="button" bitButton [disabled]="disabled" [loading]="loading" [buttonType]="'secondary'" [size]="size" [block]="block">Secondary small</button>
|
||||||
<button type="button" bitButton [disabled]="disabled" [loading]="loading" [buttonType]="'danger'" [size]="size" [block]="block">Danger small</button>
|
<button type="button" bitButton [disabled]="disabled" [loading]="loading" [buttonType]="'danger'" [size]="size" [block]="block">Danger small</button>
|
||||||
|
<button type="button" bitButton [disabled]="disabled" [loading]="loading" [buttonType]="'dangerPrimary'" [size]="size" [block]="block">Danger Primary small</button>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { ModelSignal } from "@angular/core";
|
import { ModelSignal } from "@angular/core";
|
||||||
|
|
||||||
export type ButtonType = "primary" | "secondary" | "danger" | "unstyled";
|
export type ButtonType = "primary" | "secondary" | "danger" | "dangerPrimary" | "unstyled";
|
||||||
|
|
||||||
export type ButtonSize = "default" | "small";
|
export type ButtonSize = "default" | "small";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user