on master help sign in
Tabs: style tabs
commite7b15d785f21928a992eb9bf9cff8f3a17127fe7 authorMatilde Park <matilde.park@urbit.org> dateWed 1 Jun 2022, 17:15 (4 years ago) parentee9c870
3 files changed+23−9
components/Tabs.js+10−9 styles/globals.css+4 styles/markdown.css+9
components/Tabs.js+10−9
@@ -7,16 +7,17 @@ const Tabs = ({ labels, children }) => {
77
88 return (
99 <TabContext.Provider value={currentTab}>
10− <ul role="tablist">
10+ <ul className="flex items-center display cursor-pointer space-x-4">
1111 {labels.map((label) => (
12− <li key={label}>
13− <button
14− role="tab"
15− aria-selected={label === currentTab}
16− onClick={() => setCurrentTab(label)}
17− >
18− {label}
19− </button>
12+ <li
13+ className={
14+ "block bg-wall-100 tab rounded-xl " +
15+ (currentTab === label ? "font-semibold" : "")
16+ }
17+ key={label}
18+ onClick={() => setCurrentTab(label)}
19+ >
20+ {label}
2021 </li>
2122 ))}
2223 </ul>
styles/globals.css+4
@@ -217,3 +217,7 @@ a:hover {
217217 position: static !important;
218218 border-radius: 0 !important;
219219}
220+
221+.markdown .display .tab {
222+ @apply p-3;
223+}
styles/markdown.css+9
@@ -10,6 +10,15 @@
1010 @apply pt-0 mt-0;
1111}
1212
13+.markdown .display * {
14+ margin-top: unset;
15+ margin-bottom: unset;
16+ margin-left: unset;
17+ padding: unset;
18+ padding-top: unset;
19+ padding-bottom: unset;
20+}
21+
1322.markdown p,
1423.markdown ul,
1524.markdown ol,