mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
Refined content scrolling in AdminX Settings
refs. https://github.com/TryGhost/Team/issues/3150
This commit is contained in:
parent
4a0e59487f
commit
10e48d613c
2 changed files with 8 additions and 3 deletions
|
@ -9,7 +9,7 @@ interface Props {
|
|||
const SettingSection: React.FC<Props> = ({title, children}) => {
|
||||
return (
|
||||
<>
|
||||
{title && <SettingSectionHeader title={title} />}
|
||||
{title && <SettingSectionHeader sticky={true} title={title} />}
|
||||
{children &&
|
||||
<div className="mb-[100px] flex flex-col gap-9">
|
||||
{children}
|
||||
|
|
|
@ -2,11 +2,16 @@ import React from 'react';
|
|||
|
||||
interface Props {
|
||||
title: string;
|
||||
sticky?: boolean;
|
||||
}
|
||||
|
||||
const SettingSectionHeader: React.FC<Props> = ({title}) => {
|
||||
const SettingSectionHeader: React.FC<Props> = ({title, sticky = false}) => {
|
||||
let styles = 'pb-4 text-2xs font-semibold uppercase tracking-wide text-grey-700';
|
||||
if (sticky) {
|
||||
styles += ' sticky top-0 -mt-4 pt-4 bg-white';
|
||||
}
|
||||
return (
|
||||
<h2 className="mb-4 text-2xs font-semibold uppercase tracking-wide text-grey-700">{title}</h2>
|
||||
<h2 className={styles}>{title}</h2>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue