Skip to content

Commit

Permalink
[patch] support text-overflow: ellipsis in toniq-heading
Browse files Browse the repository at this point in the history
  • Loading branch information
electrovir committed Jan 28, 2024
1 parent 55b2bf7 commit 0908528
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 9 deletions.
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@toniq-labs/design-system-root",
"version": "16.2.0",
"version": "16.2.1",
"private": true,
"description": "Root design system mono-repo package.",
"homepage": "https://github.com/Toniq-Labs/toniq-labs-design-system",
Expand Down
2 changes: 1 addition & 1 deletion packages/design-system/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@toniq-labs/design-system",
"version": "16.2.0",
"version": "16.2.1",
"private": false,
"description": "Design system elements for Toniq Labs",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,29 @@ export const toniqHeadingBookPage = defineBookPage({
`;
},
});
defineExample({
title: 'can do ellipsis',
styles: css`
${ToniqHeading}:first-of-type {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
:host {
width: 300px;
}
`,
renderCallback() {
return html`
<${ToniqHeading.assign({level: ToniqHeadingLevel.H3})}>
title longer than bounds
</${ToniqHeading}>
<${ToniqHeading.assign({level: ToniqHeadingLevel.H3})}>
title longer than bounds
</${ToniqHeading}>
`;
},
});
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export const ToniqHeading = defineToniqElement<{level: ToniqHeadingLevel}>()({
h4 {
${noNativeSpacing};
font: inherit;
overflow: inherit;
text-overflow: inherit;
}
`,
renderCallback({inputs}) {
Expand Down
2 changes: 1 addition & 1 deletion packages/native-elements-test/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@toniq-labs/design-system-native-elements-test",
"version": "16.2.0",
"version": "16.2.1",
"private": true,
"scripts": {
"compile": "virmator compile",
Expand Down
2 changes: 1 addition & 1 deletion packages/scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@toniq-labs/design-system-scripts",
"version": "16.2.0",
"version": "16.2.1",
"private": true,
"scripts": {
"compile": "virmator compile",
Expand Down

0 comments on commit 0908528

Please sign in to comment.