Skip to content

Commit 0b58034

Browse files
authored
Merge pull request #137 from nih-sparc/update-contant-tab-card-background
Updated content tab card background color
2 parents 6143043 + b9294eb commit 0b58034

File tree

2 files changed

+34
-29
lines changed

2 files changed

+34
-29
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nih-sparc/sparc-design-system-components",
3-
"version": "0.27.2",
3+
"version": "0.27.3",
44
"private": false,
55
"scripts": {
66
"serve": "vue-cli-service serve",

src/components/ContentTabCard/src/ContentTabCard.vue

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,30 @@
11
<template>
2-
<div>
3-
<div :class="[tabStyle]">
4-
<span :class="[tabStyle, 'link-container']" v-for="tab in tabs" :key="tab.label">
5-
<!-- Expect this to be either nuxt-link or router-link -->
6-
<component v-if="linkComponent"
7-
:is="linkComponent"
8-
:to="{ query: queryParams(tab.id) }"
9-
@click.native="$emit('tab-changed', tab)"
10-
:class="[{ active: tab.id === activeTabId }, tabStyle, tabClass, 'tab-link p-8']"
11-
>
12-
{{ tab.label }}
13-
</component>
14-
<a v-else-if="tab.href"
15-
:class="[{ active: tab.id === activeTabId }, tabStyle, tabClass, 'tab-link p-8']"
16-
:href="tab.href"
17-
target="_blank"
18-
>
19-
{{ tab.label }}
20-
</a>
21-
<a
22-
v-else
23-
:class="[{ active: tab.id === activeTabId }, tabStyle, tabClass, 'tab-link p-8']"
24-
@click.prevent="$emit('tab-changed', tab)"
25-
>
26-
{{ tab.label }}
27-
</a>
28-
</span>
29-
</div>
2+
<div class="card-container">
3+
<span :class="[tabStyle, 'link-container']" v-for="tab in tabs" :key="tab.label">
4+
<!-- Expect this to be either nuxt-link or router-link -->
5+
<component v-if="linkComponent"
6+
:is="linkComponent"
7+
:to="{ query: queryParams(tab.id) }"
8+
@click.native="$emit('tab-changed', tab)"
9+
:class="[{ active: tab.id === activeTabId }, tabStyle, tabClass, 'tab-link p-8']"
10+
>
11+
{{ tab.label }}
12+
</component>
13+
<a v-else-if="tab.href"
14+
:class="[{ active: tab.id === activeTabId }, tabStyle, tabClass, 'tab-link p-8']"
15+
:href="tab.href"
16+
target="_blank"
17+
>
18+
{{ tab.label }}
19+
</a>
20+
<a
21+
v-else
22+
:class="[{ active: tab.id === activeTabId }, tabStyle, tabClass, 'tab-link p-8']"
23+
@click.prevent="$emit('tab-changed', tab)"
24+
>
25+
{{ tab.label }}
26+
</a>
27+
</span>
3028
<div class="content mt-8 p-16">
3129
<slot />
3230
</div>
@@ -106,6 +104,13 @@ export default {
106104
}
107105
.content {
108106
border: 1px solid $lineColor1;
107+
background-color: white;
109108
overflow: auto;
110109
}
110+
.tab-link {
111+
background-color: white;
112+
}
113+
.card-container {
114+
line-height: normal;
115+
}
111116
</style>

0 commit comments

Comments
 (0)