Skip to content

Commit

Permalink
feat: add no-padding theme variant to tabsheet (#7606)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrediWa authored Aug 1, 2024
1 parent cdadcb5 commit 7296145
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev/tabsheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
<section style="margin-top: 40px">
<vaadin-checkbox-group label="Tabsheet theme variants" id="variant-group" theme="vertical">
<vaadin-checkbox label="bordered" value="bordered"></vaadin-checkbox>
<vaadin-checkbox label="no padding" value="no-padding"></vaadin-checkbox>
</vaadin-checkbox-group>

<vaadin-radio-group label="Direction" id="direction-group" value="ltr" theme="vertical">
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions packages/tabsheet/test/visual/lumo/tabsheet.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ describe('tabsheet', () => {
element.setAttribute('theme', 'bordered');
await visualDiff(div, `${dir}-bordered`);
});

// prettier-ignore
it('no-padding', async () => { // NOSONAR
element.setAttribute('theme', 'no-padding');
await visualDiff(div, `${dir}-no-padding`);
});
});
});
});
Expand Down
4 changes: 4 additions & 0 deletions packages/tabsheet/theme/lumo/vaadin-tabsheet-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ const tabsheet = css`
align-items: center;
justify-content: center;
}
:host([theme~='no-padding']) [part='content'] {
padding: 0;
}
`;

registerStyles('vaadin-tabsheet', [tabsheet, loader], { moduleId: 'lumo-tabsheet' });
Expand Down

0 comments on commit 7296145

Please sign in to comment.