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(Text): support multiline and fixed width ellipsis #1122

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

IsaevAlexandr
Copy link
Contributor

No description provided.

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@amje amje changed the title feat: support multyline and fixed width ellipsis in Text component feat(Text): support multiline and fixed width ellipsis Nov 14, 2023
src/components/Text/text/text.ts Outdated Show resolved Hide resolved
src/components/Text/Text.tsx Outdated Show resolved Hide resolved
src/components/Text/text/text.scss Outdated Show resolved Hide resolved
src/components/Text/text/text.scss Outdated Show resolved Hide resolved
@IsaevAlexandr
Copy link
Contributor Author

/fixed

@@ -71,6 +71,13 @@ export interface TextBaseProps {
* - text-overflow: ellipsis;
*/
ellipsis?: boolean;
/**
* The number of whole lines of text after which the content will be cut off.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a number but boolean

@IsaevAlexandr IsaevAlexandr merged commit 4e1005e into gravity-ui:next Dec 11, 2023
3 of 4 checks passed
};

if (typeof ellipsisLines === 'number') {
style.WebkitLineClamp = ellipsisLines;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What the point to use inline style, and not modifier in stylesheet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants