Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add no-padding theme variant to tabsheet #7606

Merged
merged 10 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading