Last active
February 3, 2019 06:37
-
-
Save bradfrost/8983ef87f0a236d247f9a8deaf1feefc to your computer and use it in GitHub Desktop.
React component structure
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
<Breadcrumbs> | |
<Breadcrumb text="Home" href="/" /> | |
<Breadcrumb text="Child" href="/child" /> | |
<Breadcrumb text="Grandchild" href="/child/grandchild" /> | |
</Breadcrumbs> | |
// or | |
<Breadcrumbs items={[ | |
{ | |
text: "Home", | |
href: "/" | |
}, | |
{ | |
text: "Child", | |
href: "/child" | |
}, | |
{ | |
text: "Grandchild", | |
href: "/child/grandchild" | |
} | |
]} /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This can be used like:
Or, if you don't like the default guts of it:
Not limited to the same data structure (still breadcrumbs, but using different kind of data?).
Not sure how the community feels about this though. Thoughts?