Merge branch 'fix/dict-detail-toolbar-wrap' into 'main'
fix(admin-ui): dict detail toolbar — wrap buttons вместо ломки текста See merge request 2-6/2-6-4/terravault/ordinis!14
This commit is contained in:
@@ -467,12 +467,18 @@ function DictionaryDetail() {
|
||||
: `${totalRecords} ${t('dict.list.records')}`
|
||||
}
|
||||
actions={
|
||||
<div className="flex items-center gap-2">
|
||||
// flex-wrap: при узком viewport кнопки переносятся на новую row
|
||||
// вместо вмятия в 2 строки внутри одной кнопки. whitespace-nowrap на
|
||||
// каждой Button — label всегда single line. Combination: buttons
|
||||
// expand to fit text, и весь toolbar wraps below header при узком
|
||||
// экране, а не давит лейблы.
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
<Button
|
||||
variant="secondary"
|
||||
leftIcon={<MapTrifoldIcon weight="bold" size={16} />}
|
||||
disabled={!detailQuery.data}
|
||||
onClick={() => setAoiOpen(true)}
|
||||
className="whitespace-nowrap"
|
||||
>
|
||||
{t('aoi.button')}
|
||||
</Button>
|
||||
@@ -482,6 +488,7 @@ function DictionaryDetail() {
|
||||
disabled={!detailQuery.data}
|
||||
onClick={() => setTimeTravelOpen((v) => !v)}
|
||||
aria-pressed={Boolean(timeTravelAt)}
|
||||
className="whitespace-nowrap"
|
||||
>
|
||||
{t('timeTravel.button')}
|
||||
</Button>
|
||||
@@ -490,6 +497,7 @@ function DictionaryDetail() {
|
||||
leftIcon={<GearIcon weight="bold" size={16} />}
|
||||
disabled={!detailQuery.data}
|
||||
onClick={() => setSchemaEditOpen(true)}
|
||||
className="whitespace-nowrap"
|
||||
>
|
||||
{t('schema.action.editSchema')}
|
||||
</Button>
|
||||
@@ -498,6 +506,7 @@ function DictionaryDetail() {
|
||||
leftIcon={<PlusIcon weight="bold" size={16} />}
|
||||
disabled={!detailQuery.data}
|
||||
onClick={() => setEdit({ kind: 'create' })}
|
||||
className="whitespace-nowrap"
|
||||
>
|
||||
{t('dict.action.create')}
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user