Skip to content

Commit 8d67476

Browse files
authored
fix(ObjectPageTitle): fix alignment of actions & content (#7803)
1 parent 4cca666 commit 8d67476

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

packages/main/src/components/ObjectPage/ObjectPage.stories.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import {
4040
Toolbar,
4141
ToolbarButton,
4242
} from '../../index.js';
43+
import { Tag } from '../../webComponents/Tag/index.js';
4344
import { ObjectPage } from './index.js';
4445

4546
const meta = {
@@ -78,13 +79,13 @@ const meta = {
7879
subHeader="Senior UI Developer"
7980
snappedSubHeader={'Senior UI Developer (snapped header)'}
8081
actionsBar={
81-
<Toolbar design="Transparent">
82+
<Toolbar design="Transparent" style={{ height: 'auto' }}>
8283
<ToolbarButton design={ButtonDesign.Emphasized} text="Primary Action" />
8384
<ToolbarButton design={ButtonDesign.Transparent} text="Action" />
8485
</Toolbar>
8586
}
8687
navigationBar={
87-
<Toolbar design="Transparent">
88+
<Toolbar design="Transparent" style={{ height: 'auto' }}>
8889
<ToolbarButton
8990
icon={shareIcon}
9091
design={ButtonDesign.Transparent}
@@ -117,7 +118,9 @@ const meta = {
117118
</MessageStrip>
118119
}
119120
>
120-
<ObjectStatus state={ValueState.Positive}>employed</ObjectStatus>
121+
<Tag design="Positive" style={{ alignSelf: 'center' }}>
122+
employed
123+
</Tag>
121124
</ObjectPageTitle>
122125
),
123126
headerArea: (

packages/main/src/components/ObjectPageTitle/ObjectPageTitle.module.css

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
.titleMainSection {
3939
overflow-x: hidden;
4040
flex: 1 1 auto;
41-
align-items: baseline;
4241
}
4342

4443
.middleSection {
@@ -57,6 +56,7 @@
5756
padding-block-start: 0.3125rem;
5857
overflow-wrap: break-word;
5958
hyphens: auto;
59+
align-self: start;
6060

6161
> * {
6262
font-family: inherit;
@@ -69,9 +69,16 @@
6969

7070
.snappedAvatarContainer:has([data-component-name='ObjectPageCollapsedAvatar']) {
7171
flex-shrink: 0;
72+
align-self: center;
7273
}
7374

74-
@container (min-width: 600px) and (max-width: 1023px) {
75+
@container (min-width: 1024px) {
76+
.title {
77+
padding-block-start: 0.3125rem;
78+
}
79+
}
80+
81+
@container (min-width: 600px) and (max-width: 1023.99px) {
7582
.title {
7683
padding-block-start: 0.6875rem;
7784
}
@@ -111,10 +118,10 @@
111118
.toolbar {
112119
flex-grow: 1;
113120
flex-shrink: 1.6;
114-
min-width: 3rem;
115121
display: flex;
116122
align-items: center;
117123
justify-content: flex-end;
124+
align-self: flex-start;
118125

119126
> [ui5-toolbar] {
120127
padding: 0;

0 commit comments

Comments
 (0)