mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 10:13:31 +00:00
[CL-160] Rename BadgeType to BadgeVariant (#7244)
We're establishing a common language for the Component Library. As part of this work we're renaming componentType to variant. Starting with badges.
This commit is contained in:
@@ -28,7 +28,7 @@ export default {
|
||||
}),
|
||||
],
|
||||
args: {
|
||||
badgeType: "primary",
|
||||
variant: "primary",
|
||||
truncate: false,
|
||||
},
|
||||
parameters: {
|
||||
@@ -45,12 +45,12 @@ export const Default: Story = {
|
||||
render: (args) => ({
|
||||
props: args,
|
||||
template: `
|
||||
<bit-badge-list [badgeType]="badgeType" [maxItems]="maxItems" [items]="items" [truncate]="truncate"></bit-badge-list>
|
||||
<bit-badge-list [variant]="variant" [maxItems]="maxItems" [items]="items" [truncate]="truncate"></bit-badge-list>
|
||||
`,
|
||||
}),
|
||||
|
||||
args: {
|
||||
badgeType: "info",
|
||||
variant: "info",
|
||||
maxItems: 3,
|
||||
items: ["Badge 1", "Badge 2", "Badge 3", "Badge 4", "Badge 5"],
|
||||
truncate: false,
|
||||
@@ -60,7 +60,7 @@ export const Default: Story = {
|
||||
export const Truncated: Story = {
|
||||
...Default,
|
||||
args: {
|
||||
badgeType: "info",
|
||||
variant: "info",
|
||||
maxItems: 3,
|
||||
items: ["Badge 1", "Badge 2 containing lengthy text", "Badge 3", "Badge 4", "Badge 5"],
|
||||
truncate: true,
|
||||
|
||||
Reference in New Issue
Block a user