Skip to content

Commit

Permalink
feat(): add vertical divider line feature to input-group component fo…
Browse files Browse the repository at this point in the history
…r clearer element separation
  • Loading branch information
Mladen Planinicic committed Dec 6, 2023
1 parent 78ce6ed commit 8adc064
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .changeset/hungry-kings-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
'@baloise/design-system-components': minor
---

Add vertical divider line feature to input-group component for clearer element separation.

```html
<bal-input-group>
<bal-icon name="call"></bal-icon>
<bal-divider layout="vertical"></bal-divider>
<bal-select style="max-width: 106px" value="DE">
<bal-select-option label="DE" value="DE">DE</bal-select-option>
<bal-select-option label="FR" value="FR">FR</bal-select-option>
<bal-select-option label="IT" value="IT">IT</bal-select-option>
</bal-select>
<bal-divider layout="vertical"></bal-divider>
<bal-input placeholder="Placeholder"></bal-input>
</bal-input-group>
```
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ const meta: Meta<Args> = {
<bal-input-group class="mb-normal">
<bal-icon name="call"></bal-icon>
<bal-divider layout="vertical"></bal-divider>
<bal-select style="max-width: 106px" value="DE">
<bal-select-option label="DE" value="DE">DE</bal-select-option>
<bal-select-option label="FR" value="FR">FR</bal-select-option>
<bal-select-option label="IT" value="IT">IT</bal-select-option>
</bal-select>
<bal-divider layout="vertical"></bal-divider>
<bal-input placeholder="79 123 45 67"></bal-input>
</bal-input-group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
.bal-select__control
border: none
min-height: 2.75rem
padding-right: 0

.bal-select__control__input
padding-left: 0 !important
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,20 @@
</bal-input-group>
</section>

<section data-testid="divider">
<bal-input-group>
<bal-icon name="call"></bal-icon>
<bal-divider layout="vertical"></bal-divider>
<bal-select style="max-width: 106px" value="DE">
<bal-select-option label="DE" value="DE">DE</bal-select-option>
<bal-select-option label="FR" value="FR">FR</bal-select-option>
<bal-select-option label="IT" value="IT">IT</bal-select-option>
</bal-select>
<bal-divider layout="vertical"></bal-divider>
<bal-input placeholder="Placeholder"></bal-input>
</bal-input-group>
</section>

<section data-testid="tags">
<bal-input-group>
<bal-tag closable>Tag</bal-tag>
Expand Down
2 changes: 2 additions & 0 deletions test/cypress/e2e/visual/bal-input-group.visual.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ describe('bal-input-group', () => {
cy.getByTestId('phone').compareSnapshot('input-group-phone')
cy.getByTestId('phone-disabled').compareSnapshot('input-group-phone-disabled')
cy.getByTestId('phone-invalid').compareSnapshot('input-group-phone-invalid')
cy.getByTestId('divider').compareSnapshot('input-group-divider')

cy.platform('mobile')
cy.getByTestId('phone').compareSnapshot('input-group-phone-mobile')
cy.getByTestId('phone-disabled').compareSnapshot('input-group-phone-disabled-mobile')
cy.getByTestId('phone-invalid').compareSnapshot('input-group-phone-invalid-mobile')
cy.getByTestId('divider').compareSnapshot('input-group-divider-mobile')
})

it('tags component', () => {
Expand Down

0 comments on commit 8adc064

Please sign in to comment.