Fix broken column header layout after heading refactor (#39331)
This commit is contained in:
parent
5553448678
commit
1bfdfcae7b
@ -276,17 +276,20 @@ export const ColumnHeader: React.FC<Props> = ({
|
|||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const titleClassNames = classNames('column-header__title', {
|
||||||
|
'column-header__title--with-back-button': !!backButton,
|
||||||
|
});
|
||||||
|
|
||||||
const component = (
|
const component = (
|
||||||
<div className={wrapperClassName}>
|
<div className={wrapperClassName}>
|
||||||
<div className={headingClassName}>
|
<div className={headingClassName}>
|
||||||
|
{backButton}
|
||||||
{hasTitle && (
|
{hasTitle && (
|
||||||
<h1 className='column-header__title-wrapper'>
|
<h1 className='column-header__title-wrapper'>
|
||||||
{backButton}
|
|
||||||
|
|
||||||
{onClick ? (
|
{onClick ? (
|
||||||
<button
|
<button
|
||||||
onClick={handleTitleClick}
|
onClick={handleTitleClick}
|
||||||
className='column-header__title'
|
className={titleClassNames}
|
||||||
type='button'
|
type='button'
|
||||||
id={getColumnSkipLinkId(columnIndex)}
|
id={getColumnSkipLinkId(columnIndex)}
|
||||||
>
|
>
|
||||||
@ -294,7 +297,7 @@ export const ColumnHeader: React.FC<Props> = ({
|
|||||||
</button>
|
</button>
|
||||||
) : (
|
) : (
|
||||||
<span
|
<span
|
||||||
className='column-header__title'
|
className={titleClassNames}
|
||||||
tabIndex={-1}
|
tabIndex={-1}
|
||||||
id={getColumnSkipLinkId(columnIndex)}
|
id={getColumnSkipLinkId(columnIndex)}
|
||||||
>
|
>
|
||||||
@ -304,8 +307,6 @@ export const ColumnHeader: React.FC<Props> = ({
|
|||||||
</h1>
|
</h1>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{!hasTitle && backButton}
|
|
||||||
|
|
||||||
<div className='column-header__buttons'>
|
<div className='column-header__buttons'>
|
||||||
{extraButton}
|
{extraButton}
|
||||||
{collapseButton}
|
{collapseButton}
|
||||||
|
|||||||
@ -4639,14 +4639,15 @@ a.status-card {
|
|||||||
outline: 0;
|
outline: 0;
|
||||||
|
|
||||||
&__title-wrapper {
|
&__title-wrapper {
|
||||||
|
display: flex;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__title {
|
&__title {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
|
||||||
gap: 5px;
|
gap: 5px;
|
||||||
|
flex-grow: 1;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
padding: 13px;
|
padding: 13px;
|
||||||
@ -4659,6 +4660,10 @@ a.status-card {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
||||||
|
&--with-back-button {
|
||||||
|
padding-inline-start: 0;
|
||||||
|
}
|
||||||
|
|
||||||
&:focus-visible {
|
&:focus-visible {
|
||||||
outline: var(--outline-focus-default);
|
outline: var(--outline-focus-default);
|
||||||
}
|
}
|
||||||
@ -4668,10 +4673,6 @@ a.status-card {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.column-header__back-button + &__title {
|
|
||||||
padding-inline-start: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.column-header__back-button {
|
.column-header__back-button {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
color: var(--color-text-brand);
|
color: var(--color-text-brand);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user