Skip to content

Commit

Permalink
feat(divider): use class
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielduete committed Jan 30, 2025
1 parent 249785f commit 8f03d80
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/components/divider/divider.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
height: 1px;
width: 100%;

&[data-type='vertical'] {
&.vertical {
height: 100%;
width: 1px;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/components/divider/divider.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('atom-divider', () => {
expect(page.root).toEqualHtml(`
<atom-divider type='horizontal'>
<mock:shadow-root>
<div class="atom-divider" data-type="horizontal"></div>
<div aria-hidden="" class="atom-divider horizontal"></div>
</mock:shadow-root>
</atom-divider>
`)
Expand All @@ -32,7 +32,7 @@ it('should render with prop vertical', async () => {
expect(page.root).toEqualHtml(`
<atom-divider type='vertical'>
<mock:shadow-root>
<div class="atom-divider" data-type="vertical"></div>
<div aria-hidden="" class="atom-divider vertical"></div>
</mock:shadow-root>
</atom-divider>
`)
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/divider/divider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export class AtomDivider {
@Prop() type: 'horizontal' | 'vertical' = 'horizontal'

render() {
return <div data-type={this.type} class='atom-divider' aria-hidden={true} />
return <div class={`atom-divider ${this.type}`} aria-hidden={true} />
}
}

0 comments on commit 8f03d80

Please sign in to comment.