1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-25 06:24:19 +00:00

✏ Rename BoxWithHeader to BoxFull

This commit is contained in:
Stefano Pigozzi 2021-04-23 02:26:16 +02:00
parent 21c206aeaa
commit c81671a102
Signed by untrusted user who does not match committer: steffo
GPG key ID: 6965406171929D01
6 changed files with 28 additions and 28 deletions

View file

@ -1,5 +1,5 @@
import React from "react" import React from "react"
import Style from "./BoxWithHeader.module.css" import Style from "./BoxFull.module.css"
import classNames from "classnames" import classNames from "classnames"
@ -13,7 +13,7 @@ import classNames from "classnames"
* @returns {JSX.Element} * @returns {JSX.Element}
* @constructor * @constructor
*/ */
export default function BoxWithHeader({ header, children, className, ...props }) { export default function BoxFull({ header, children, className, ...props }) {
return ( return (
<div className={classNames(Style.BoxWithHeader, className)} {...props}> <div className={classNames(Style.BoxWithHeader, className)} {...props}>
<div className={Style.BoxHeader}> <div className={Style.BoxHeader}>

View file

@ -1,18 +1,18 @@
import React from "react" import React from "react"
import Style from "./PageAlerts.module.css" import Style from "./PageAlerts.module.css"
import classNames from "classnames" import classNames from "classnames"
import BoxWithHeader from "../components/BoxWithHeader" import BoxFull from "../components/BoxFull"
export default function PageAlerts({ children, className, ...props }) { export default function PageAlerts({ children, className, ...props }) {
return ( return (
<div className={classNames(Style.PageAlerts, className)} {...props}> <div className={classNames(Style.PageAlerts, className)} {...props}>
<BoxWithHeader header={"Your alerts"} className={Style.YourAlerts}> <BoxFull header={"Your alerts"} className={Style.YourAlerts}>
a a
</BoxWithHeader> </BoxFull>
<BoxWithHeader header={"Create new alert"} className={Style.CreateAlert}> <BoxFull header={"Create new alert"} className={Style.CreateAlert}>
b b
</BoxWithHeader> </BoxFull>
</div> </div>
) )
} }

View file

@ -2,7 +2,7 @@ import React from "react"
import Style from "./PageHome.module.css" import Style from "./PageHome.module.css"
import classNames from "classnames" import classNames from "classnames"
import BoxHeader from "../components/BoxHeader" import BoxHeader from "../components/BoxHeader"
import BoxWithHeader from "../components/BoxWithHeader" import BoxFull from "../components/BoxFull"
import Checkbox from "../components/Checkbox" import Checkbox from "../components/Checkbox"
import InputWithIcon from "../components/InputWithIcon" import InputWithIcon from "../components/InputWithIcon"
import { faFolder, faPlus } from "@fortawesome/free-solid-svg-icons" import { faFolder, faPlus } from "@fortawesome/free-solid-svg-icons"
@ -18,22 +18,22 @@ export default function PageHome({ children, className, ...props }) {
<BoxHeader className={Style.Header}> <BoxHeader className={Style.Header}>
Create a new repository Create a new repository
</BoxHeader> </BoxHeader>
<BoxWithHeader className={Style.SearchByZone} header={ <BoxFull className={Style.SearchByZone} header={
<span><Checkbox/> Search by zone</span> <span><Checkbox/> Search by zone</span>
}> }>
</BoxWithHeader> </BoxFull>
<BoxWithHeader className={Style.SearchByHashtags} header={ <BoxFull className={Style.SearchByHashtags} header={
<span><Checkbox/> Search by hashtag</span> <span><Checkbox/> Search by hashtag</span>
}> }>
</BoxWithHeader> </BoxFull>
<BoxWithHeader className={Style.SearchByTimePeriod} header={ <BoxFull className={Style.SearchByTimePeriod} header={
<span><Checkbox/> Search by time period</span> <span><Checkbox/> Search by time period</span>
}> }>
</BoxWithHeader> </BoxFull>
<BoxWithHeader className={Style.CreateDialog} header={"Create repository"}> <BoxFull className={Style.CreateDialog} header={"Create repository"}>
<LabelledForm action={""}> <LabelledForm action={""}>
<Label for_={"repo-name"} text={"Repository name"}> <Label for_={"repo-name"} text={"Repository name"}>
<InputWithIcon id={"repo-name"} icon={faFolder}/> <InputWithIcon id={"repo-name"} icon={faFolder}/>
@ -51,7 +51,7 @@ export default function PageHome({ children, className, ...props }) {
Create repository Create repository
</Button> </Button>
</LabelledForm> </LabelledForm>
</BoxWithHeader> </BoxFull>
</div> </div>
) )
} }

View file

@ -1,18 +1,18 @@
import React from "react" import React from "react"
import Style from "./PageRepositories.module.css" import Style from "./PageRepositories.module.css"
import classNames from "classnames" import classNames from "classnames"
import BoxWithHeader from "../components/BoxWithHeader" import BoxFull from "../components/BoxFull"
export default function PageRepositories({ children, className, ...props }) { export default function PageRepositories({ children, className, ...props }) {
return ( return (
<div className={classNames(Style.PageRepositories, className)} {...props}> <div className={classNames(Style.PageRepositories, className)} {...props}>
<BoxWithHeader header={"Your active repositories"} className={Style.ActiveRepositories}> <BoxFull header={"Your active repositories"} className={Style.ActiveRepositories}>
a a
</BoxWithHeader> </BoxFull>
<BoxWithHeader header={"Your archived repositories"} className={Style.ArchivedRepositories}> <BoxFull header={"Your archived repositories"} className={Style.ArchivedRepositories}>
b b
</BoxWithHeader> </BoxFull>
</div> </div>
) )
} }

View file

@ -2,7 +2,7 @@ import React from "react"
import Style from "./PageSettings.module.css" import Style from "./PageSettings.module.css"
import classNames from "classnames" import classNames from "classnames"
import BoxHeader from "../components/BoxHeader" import BoxHeader from "../components/BoxHeader"
import BoxWithHeader from "../components/BoxWithHeader" import BoxFull from "../components/BoxFull"
import Select from "../components/Select" import Select from "../components/Select"
import SelectTheme from "../components/SelectTheme" import SelectTheme from "../components/SelectTheme"
@ -16,15 +16,15 @@ export default function PageSettings({ children, className, ...props }) {
<BoxHeader> <BoxHeader>
Switch theme: <SelectTheme/> Switch theme: <SelectTheme/>
</BoxHeader> </BoxHeader>
<BoxWithHeader header={"Change your email address"}> <BoxFull header={"Change your email address"}>
</BoxWithHeader> </BoxFull>
<BoxWithHeader header={"Alert settings"}> <BoxFull header={"Alert settings"}>
</BoxWithHeader> </BoxFull>
<BoxWithHeader header={"Change your password"}> <BoxFull header={"Change your password"}>
</BoxWithHeader> </BoxFull>
</div> </div>
) )
} }