Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add table of contents and tabs group to style guide #669

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions pages/md-style-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,40 @@ Danger is a special type of info box in which text showing any danger can be sho
#### Example

<Danger label="label"> message to show. </Danger>

---

### **Table of Contents**

Table of Contents provides a structured overview of the main sections or chapters within the current page/document.

```markdown
<TableOfContent content={content} depth={depth} />
```

#### Example

<TableOfContent depth={5} />

---

### **Tabs Group**

This can be used to group multiple tabs under a common name and differentiated by specific labels and content.

```markdown
[tabs-start "label"]
[tab "name"]
message to show
```
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I add this line:

[tabs-end]

This gets treated as a tab group and gets rendered rather than displaying as a code block. Any help on this appreciated.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding one newline [enter] might help in this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DhairyaMajmudar Is this what you meant?
image

If so it is still the same.
image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, add newline before [tab-end]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still the same😢

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added newline before, after and both. All three yeild the same result as above.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let me check if I can find any another solution 👍🏻


#### Example

[tabs-start "label"]

[tab "name"]
message to show
[tab "name"]
message to show

[tabs-end]
77 changes: 39 additions & 38 deletions styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,40 +45,39 @@ html {
}

/* .herobtn { */
/* background-color: transparent !important; */
/* justify-content: center; */
/* width: 168px; */
/* height: 32px; */
/* padding: 8px 8px; */
/* margin-right: 10px; */
/* display: flex; */
/* border: 1px solid #E3E8EE;
/* background-color: transparent !important; */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need to modify the css to just add to new tags to the style guide. I think your are adding here your work to modify the design of the table of contents but we should avoid it. Please use two different branches to fix each issue.

/* justify-content: center; */
/* width: 168px; */
/* height: 32px; */
/* padding: 8px 8px; */
/* margin-right: 10px; */
/* display: flex; */
/* border: 1px solid #E3E8EE;
border-radius: 4px; */
/* } */

/* @media (max-width: 1027px) { */
.DocSearch-Button-Container {
height: 40px;
padding: 0px;
border: none;
}
.DocSearch-Button-Container {
height: 40px;
padding: 0px;
border: none;
}

.DocSearch-Button {
margin: 0;
width: 39px;
}
.DocSearch-Button {
margin: 0;
width: 39px;
}

.DocSearch-Button-Placeholder {
display: none;
}
.DocSearch-Button-Placeholder {
display: none;
}

.DocSearch-Search-Icon {
width: 20px;
height: 20px;
}

.DocSearch-Search-Icon {
width: 20px;
height: 20px;
}

/* .herobtn .DocSearch-Button-Container {
/* .herobtn .DocSearch-Button-Container {
margin-right: 4px;
margin-left: 4px;
} */
Expand All @@ -101,14 +100,20 @@ border-radius: 4px; */

/** Style Algolia */

.keygrad{
--docsearch-key-gradient: linear-gradient(-225deg, #d5dbe4, #f8f8f8) !important;
.keygrad {
--docsearch-key-gradient: linear-gradient(
-225deg,
#d5dbe4,
#f8f8f8
) !important;
}
.keyshadow{
--docsearch-key-shadow: inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,0.4) !important;
.keyshadow {
--docsearch-key-shadow: inset 0 -2px 0 0 #cdcde6, inset 0 0 1px 1px #fff,
0 1px 2px 1px rgba(30, 35, 90, 0.4) !important;
}
.keyshadow[data-theme=dark]{
--docsearch-key-shadow: inset 0 -2px 0 0 #ffffff, inset 0 0 1px 1px #ffffff, 0 2px 2px 0 rgba(3, 4, 9, 0.3) !important;
.keyshadow[data-theme='dark'] {
--docsearch-key-shadow: inset 0 -2px 0 0 #ffffff, inset 0 0 1px 1px #ffffff,
0 2px 2px 0 rgba(3, 4, 9, 0.3) !important;
}

.search-input {
Expand Down Expand Up @@ -140,8 +145,6 @@ border-radius: 4px; */
margin-left: 40px;
}



.search-input span {
margin-left: 15px;
}
Expand Down Expand Up @@ -222,10 +225,8 @@ border-radius: 4px; */
margin-top: 4.4rem;
}


@layer base{
@layer base {
body {
@apply dark:bg-slate-800 bg-white;
@apply dark:bg-slate-800 bg-white;
}
}