Made Recommendation settings and Table component responsive

refs https://github.com/TryGhost/Product/issues/3839
This commit is contained in:
Djordje Vlaisavljevic 2023-09-08 12:43:09 +01:00
parent 8d1e636ca8
commit 797dc4f218
2 changed files with 7 additions and 2 deletions

View File

@ -78,7 +78,7 @@ const Table: React.FC<TableProps> = ({children, borderTop, hint, hintSeparator,
{(hint || pagination) &&
<div className="-mt-px">
{(hintSeparator || pagination) && <Separator />}
<div className="flex justify-between">
<div className="flex flex-col-reverse items-start justify-between gap-1 pt-2 md:flex-row md:items-center md:gap-0 md:pt-0 ">
<Hint>{hint ?? ' '}</Hint>
<OptionalPagination pagination={pagination} />
</div>

View File

@ -25,7 +25,7 @@ const Recommendations: React.FC<{ keywords: string[] }> = ({keywords}) => {
};
const buttons = (
<Button color='green' label='Add recommendation' link={true} onClick={() => {
<Button className='hidden md:!visible md:!block' color='green' label='Add recommendation' link={true} onClick={() => {
openAddNewRecommendationModal();
}} />
);
@ -60,6 +60,11 @@ const Recommendations: React.FC<{ keywords: string[] }> = ({keywords}) => {
title="Recommendations"
onSave={handleSave}
>
<div className='flex justify-center rounded border border-green px-4 py-2 md:hidden'>
<Button color='green' label='Add recommendation' link onClick={() => {
openAddNewRecommendationModal();
}} />
</div>
<TabView selectedTab={selectedTab} tabs={tabs} onTabChange={setSelectedTab} />
</SettingGroup>
);