-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Samuel Colvin <s@muelcolvin.com>
- Loading branch information
1 parent
106d6c5
commit 85b48fc
Showing
12 changed files
with
132 additions
and
38 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
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
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,22 @@ | ||
import { FC } from 'react' | ||
import { components, models, useClassName } from 'fastui' | ||
|
||
export const Footer: FC<models.Footer> = (props) => { | ||
const links = props.links.map((link) => { | ||
link.mode = link.mode || 'footer' | ||
return link | ||
}) | ||
const extraProp = useClassName(props, { el: 'extra' }) | ||
return ( | ||
<footer className={useClassName(props)}> | ||
<ul className={useClassName(props, { el: 'link-list' })}> | ||
{links.map((link, i) => ( | ||
<li key={i} className="nav-item"> | ||
<components.LinkComp {...link} /> | ||
</li> | ||
))} | ||
</ul> | ||
{props.extraText && <div className={extraProp}>{props.extraText}</div>} | ||
</footer> | ||
) | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type { Footer } from '../models' | ||
|
||
import { useClassName } from '../hooks/className' | ||
|
||
import { LinkComp } from './link' | ||
|
||
export const FooterComp = (props: Footer) => { | ||
const links = props.links.map((link) => { | ||
link.mode = link.mode || 'footer' | ||
return link | ||
}) | ||
const extraTextClassName = useClassName(props, { el: 'extra' }) | ||
return ( | ||
<footer className={useClassName(props)}> | ||
{links.map((link, i) => ( | ||
<LinkComp key={i} {...link} /> | ||
))} | ||
{props.extraText && <div className={extraTextClassName}>{props.extraText}</div>} | ||
</footer> | ||
) | ||
} |
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
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