1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-08-23 14:14:05 +02:00

Add CSS code for navigation patterns

This commit is contained in:
Phuoc Nguyen
2021-03-31 16:58:58 +07:00
parent 9156f3a5cc
commit 39b2f3383b
20 changed files with 549 additions and 497 deletions

View File

@@ -47,36 +47,42 @@ const Details: React.FC<{}> = () => {
<div className='p-8 pb-20'>
<BrowserFrame
html={`
<div style="
/* Center the content */
align-items: center;
display: flex;
justify-content: center;
">
<div class="tabs">
<!-- Active tab -->
<div style="
/* Border */
border: 1px solid rgba(0, 0, 0, 0.3);
/* Hide the bottom border */
border-bottom-color: transparent;
/* Border radius */
border-top-left-radius: 2px;
border-top-right-radius: 2px;
">
<div class="tab--active">
...
</div>
<!-- Inactive tab -->
<div style="
/* Has only the bottom border */
border-bottom: 1px solid rgba(0, 0, 0, 0.3);
">
<div class="tab--inactive">
...
</div>
</div>
`}
css={``}
css={`
.tabs {
/* Center the content */
align-items: center;
display: flex;
justify-content: center;
}
.tab--active {
/* Border */
border: 1px solid rgba(0, 0, 0, 0.3);
/* Hide the bottom border */
border-bottom-color: transparent;
/* Border radius */
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
.tab--inactive {
/* Has only the bottom border */
border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}
`}
>
<div
style={{