-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add search and pagination on community members page
- Loading branch information
Showing
10 changed files
with
317 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { fr } from "@codegouvfr/react-dsfr"; | ||
import ButtonsGroup, { ButtonsGroupProps } from "@codegouvfr/react-dsfr/ButtonsGroup"; | ||
import { ReactNode } from "react"; | ||
import { useStyles } from "tss-react"; | ||
|
||
interface IPageTitleProps { | ||
buttons?: ButtonsGroupProps.Common["buttons"]; | ||
children?: ReactNode; | ||
showButtons?: boolean; | ||
title: ReactNode; | ||
} | ||
|
||
function PageTitle(props: IPageTitleProps) { | ||
const { buttons, children, showButtons, title } = props; | ||
const { css } = useStyles(); | ||
|
||
return ( | ||
<div className={fr.cx("fr-grid-row")}> | ||
<div className={fr.cx("fr-col-12", "fr-col-lg-8")}> | ||
<h1>{title}</h1> | ||
{children} | ||
</div> | ||
<div | ||
className={fr.cx("fr-col-12", "fr-col-lg-4", "fr-col--top")} | ||
style={{ | ||
display: "flex", | ||
alignItems: "center", | ||
}} | ||
> | ||
{showButtons && buttons && ( | ||
<div | ||
className={css({ | ||
marginLeft: "inherit", | ||
[fr.breakpoints.up("lg")]: { | ||
marginLeft: "auto", | ||
}, | ||
})} | ||
> | ||
<ButtonsGroup buttons={buttons} inlineLayoutWhen="sm and up" /> | ||
</div> | ||
)} | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default PageTitle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.