Skip to content

Commit

Permalink
add pub components
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie85270 committed Mar 16, 2021
1 parent 2ae7b82 commit f22f5c4
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion components/kit/components/form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const Forms: FC = () => {
},
];

return <SectionDesc id="forms" items={formSections} title="Forms" />;
return <SectionDesc id="forms" withPub items={formSections} title="Forms" />;
};

export default Forms;
2 changes: 1 addition & 1 deletion components/kit/components/list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const ListPage: FC = () => {
},
];

return <SectionDesc id="list" items={tableSections} title="List" />;
return <SectionDesc id="list" withPub items={tableSections} title="List" />;
};

export default ListPage;
2 changes: 1 addition & 1 deletion components/kit/components/navigation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Navigation: FC = () => {
},
];

return <SectionDesc id="navigation" items={formSections} title="Navigation" />;
return <SectionDesc id="navigation" withPub items={formSections} title="Navigation" />;
};

export default Navigation;
11 changes: 10 additions & 1 deletion components/kit/templates/errorsPages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,16 @@ const ErrorPages = () => {
},
];

return <SectionDesc isTemplate={true} hasCommingSoon={true} id="home" items={homeSection} title="Errors pages" />;
return (
<SectionDesc
isTemplate={true}
withPub
hasCommingSoon={true}
id="home"
items={homeSection}
title="Errors pages"
/>
);
};

export default ErrorPages;
5 changes: 3 additions & 2 deletions components/site/section/SectionDesc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ interface Props {
id: string;
isTemplate?: boolean;
hasCommingSoon?: boolean;
withPub?: boolean;
}

interface section {
Expand All @@ -19,7 +20,7 @@ interface section {
isNew?: boolean;
}

const SectionDesc = ({ title, items, id, hasCommingSoon, isTemplate }: Props) => {
const SectionDesc = ({ title, items, id, hasCommingSoon, isTemplate, withPub }: Props) => {
return (
<div className="mb-8" id={id}>
<h1 className="w-full text-left text-2xl font-light mb-4 text-gray-600">{title}</h1>
Expand Down Expand Up @@ -76,7 +77,7 @@ const SectionDesc = ({ title, items, id, hasCommingSoon, isTemplate }: Props) =>
)}
</>
</div>
<SquarePub />
{withPub && <SquarePub />}
</div>
);
};
Expand Down

0 comments on commit f22f5c4

Please sign in to comment.