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

[Feature] Tabs нужна css переменная для указания максимальной ширины #1244

Closed
1 of 9 tasks
bree7e opened this issue Dec 27, 2023 · 1 comment · Fixed by #1249
Closed
1 of 9 tasks
Assignees
Labels
estimate:sp1 Story Point - 1 extra Not planed initially for sprint
Milestone

Comments

@bree7e
Copy link

bree7e commented Dec 27, 2023

Библиотека

  • @prizm-ui/core
  • @prizm-ui/components
  • @prizm-ui/install
  • @prizm-ui/icons
  • @prizm-ui/flag-icons
  • @prizm-ui/theme
  • @prizm-ui/charts
  • @prizm-ui/ast
  • @prizm-ui/nx-plugin

Компонент

Tabs
https://prizm.site/components/tabs

Предложение

Работаю в рамках задачи проекта СОУ "Учёт движения - таб вкладки обрезается не доходя до максимальной ширины"
Нужно увеличить максимальную ширину до 400px.

Предлагаю сделать css переменную для max-width таба. Сейчас прибито 200px. Предлагаю добавить переменную с fallback. Например такую:

.tabs > prizm-tabs prizm-tab button {
    max-width: var(--prizm-tabs__tab-button-max-width, 200px);
}
@ickisIckis ickisIckis self-assigned this Dec 27, 2023
@ickisIckis ickisIckis added this to the 3.9.0 milestone Dec 27, 2023
@bree7e
Copy link
Author

bree7e commented Dec 27, 2023

Извиняюсь: изначально неверно сформулировал постановку. 200px это был вот такой костыль в проекте.

    ::ng-deep {
      prizm-tab {
        button {
          max-width: 200px;
        }
      }
   }

В призме хотелось бы добавить возможность ограничивать максимальную ширину таба, чтобы имя таба обрезалось в три точки. Вот такой финт:

image

Тогда можно будет обходится без костыля в проекте.

@ickisIckis ickisIckis added extra Not planed initially for sprint estimate:sp1 Story Point - 1 labels Dec 27, 2023
ZurabDev added a commit that referenced this issue Dec 29, 2023
feat: added css variable for tab max-width #1244
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
estimate:sp1 Story Point - 1 extra Not planed initially for sprint
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants