mirror of
https://github.com/Redocly/redoc.git
synced 2025-04-28 12:43:45 +03:00
Refactored tabs styling from inside the component
This commit is contained in:
parent
99fc52d7de
commit
dce75ccd92
|
@ -10,8 +10,7 @@ import {CORE_DIRECTIVES} from 'angular2/common';
|
||||||
template: `
|
template: `
|
||||||
<ul>
|
<ul>
|
||||||
<li *ngFor="#tab of tabs" [ngClass]="{active: tab.active}" (click)="selectTab(tab)"
|
<li *ngFor="#tab of tabs" [ngClass]="{active: tab.active}" (click)="selectTab(tab)"
|
||||||
class="tab-{{tab.tabStatus}}"> {{tab.tabTitle}}
|
class="tab-{{tab.tabStatus}}">{{tab.tabTitle}}</li>
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
<ng-content></ng-content>
|
<ng-content></ng-content>
|
||||||
`,
|
`,
|
||||||
|
|
|
@ -3,24 +3,16 @@
|
||||||
ul {
|
ul {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 10px 0px 0 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
li {
|
li {
|
||||||
font-size: 13px;
|
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin: 2px 0;
|
|
||||||
padding: 2px 5px;
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: #8A9094;
|
|
||||||
line-height: 1.25;
|
|
||||||
color: $sample-panel-headers-color;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
li.active {
|
li.active {
|
||||||
background-color: white;
|
|
||||||
color: #666;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-success, .tab-error, .tab-redirect, .tab-info {
|
.tab-success, .tab-error, .tab-redirect, .tab-info {
|
||||||
|
@ -31,9 +23,8 @@ li.active {
|
||||||
height: 6px;
|
height: 6px;
|
||||||
width: 6px;
|
width: 6px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
margin-right: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-success:before {
|
.tab-success:before {
|
||||||
|
|
|
@ -14,3 +14,21 @@ header {
|
||||||
color: $sample-panel-headers-color;
|
color: $sample-panel-headers-color;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:host tabs li {
|
||||||
|
font-size: 13px;
|
||||||
|
margin: 2px 0;
|
||||||
|
padding: 2px 5px;
|
||||||
|
color: #8A9094;
|
||||||
|
line-height: 1.25;
|
||||||
|
color: $sample-panel-headers-color;
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
background-color: white;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
:host tabs ul {
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user