Topbar
💡
Folder location:
src/components/topbar
Examples
import { Topbar, TopbarLanguageSelector, TopbarSocialLinks } from "components/topbar";
// CUSTOM DATA MODEL
import { Topbar } from 'models/Layout.model'
// Example 1
export default function Example1({ topbar }:{ topbar: Topbar }) {
return (
<Topbar>
<Topbar.Left label={topbar.label} title={topbar.title} />
<Topbar.Right>
<TopbarLanguageSelector languages={topbar.languageOptions} />
<TopbarSocialLinks links={topbar.socials} />
</Topbar.Right>
</Topbar>
)
}
// Example 2
export default function Example2({ topbar }:{ topbar: Topbar }) {
return (
<Topbar bgColor="red">
<Topbar.Left label={topbar.label} title={topbar.title} />
<Topbar.Right>
<TopbarLanguageSelector languages={topbar.languageOptions} />
<TopbarSocialLinks links={topbar.socials} />
</Topbar.Right>
</Topbar>
)
}
Views
Example-1

Example-2

Used
Props
Name | Type | Required | Default |
---|---|---|---|
children | ReactNode | Yes | - |
bgColor | string | Optional | - |