From e0e9b655ef51e731607e2381e2b2256f074c2eb4 Mon Sep 17 00:00:00 2001 From: literat Date: Tue, 17 Oct 2023 10:49:54 +0200 Subject: [PATCH] fixup! Docs(web, web-react, web-twig): Dealing with text truncate in Breadcrumb --- packages/web-react/src/components/Breadcrumbs/README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/web-react/src/components/Breadcrumbs/README.md b/packages/web-react/src/components/Breadcrumbs/README.md index f4e07ef028..c1a3222694 100644 --- a/packages/web-react/src/components/Breadcrumbs/README.md +++ b/packages/web-react/src/components/Breadcrumbs/README.md @@ -93,7 +93,11 @@ Use the `BreadcrumbsItem` component for the ordered list as the component's chil ### Dealing with long titles -When you need to shorten the title of the BreadcrumbsItem you can use both helper class `text-truncate` or use any of the multiple ways in JavaScript which will truncate a string for you like `.slice` or `.substring`, e. g. `str.slice(0, num) + '...'`. -You can also use any of the existing npm packages which deals with truncating the string. +When you need to shorten the title of the BreadcrumbsItem the preferred way is to use platform native helpers. +There are multiple ways in JavaScript which will truncate a string for you like `.slice` or `.substring`, e.g. `str.slice(0, num) + '…'`. + +Additional option is to use helper class `text-truncate` with defined width. + +You can also use any of the existing [npm packages which deal with truncating the string](https://www.npmjs.com/search?q=truncate). For detailed information see [Breadcrumbs](https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web/src/scss/components/Breadcrumbs/README.md) component