Skip to content

Commit

Permalink
fix: chage type terciary to info
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielduete committed Aug 24, 2023
1 parent 65f5928 commit 2127480
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
7 changes: 6 additions & 1 deletion packages/core/src/components/badge/badge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,20 @@

&[color='warning'] {
background-color: var(--color-contextual-warning-regular);
color: var(--color-neutral-regular);
}

&[color='danger'] {
background-color: var(--color-contextual-error-regular);
}

&[color='info'] {
background-color: var(--color-contextual-info-regular);
}

&[color='neutral'] {
background-color: var(--color-neutral-light-3);
color: var(--color-neutral-light-2);
color: var(--color-neutral-regular);
}

&[color='dark'] {
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/components/badge/badge.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,18 @@ describe('atom-badge', () => {
`)
})

it('should add "ion-color-tertiary" class when type prop is tertiary', async () => {
it('should add "ion-color-info" class when type prop is info', async () => {
const page = await newSpecPage({
components: [AtomBadge],
html: `<atom-badge type='tertiary'>Badge</atom-badge>`,
html: `<atom-badge type='info'>Badge</atom-badge>`,
})

await page.waitForChanges()

expect(page.root).toEqualHtml(`
<atom-badge type='tertiary'>
<atom-badge type='info'>
<mock:shadow-root>
<ion-badge color='tertiary' class="atom-badge">
<ion-badge color='info' class="atom-badge">
<slot></slot>
</ion-badge>
</mock:shadow-root>
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/badge/badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class AtomBadge {
@Prop() type:
| 'primary'
| 'secondary'
| 'tertiary'
| 'info'
| 'success'
| 'warning'
| 'danger'
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/badge/stories/badge.args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const BadgeStoryArgs = {
options: [
'primary',
'secondary',
'tertiary',
'info',
'success',
'warning',
'danger',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ export const Secondary: StoryObj = {
},
}

export const Tertiary: StoryObj = {
export const Info: StoryObj = {
render: (args) => createBadge(args),
args: {
...Primary.args,
type: 'tertiary',
type: 'info',
},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ export const Dark: StoryObj = {
},
}

export const Tertiary: StoryObj = {
export const Info: StoryObj = {
render: (args) => createBadge(args),
args: {
...Primary.args,
type: 'tertiary',
type: 'info',
},
}

0 comments on commit 2127480

Please sign in to comment.