ui: Reorganize Tabs CSS (#9313)
This commit is contained in:
parent
a814338374
commit
89a70502e6
|
@ -1,5 +1,16 @@
|
||||||
@import './skin';
|
@import './skin';
|
||||||
@import './layout';
|
@import './layout';
|
||||||
|
.tab-nav {
|
||||||
|
@extend %tab-nav;
|
||||||
|
}
|
||||||
|
%tab-nav.animatable {
|
||||||
|
@extend %with-animated-tab-selection;
|
||||||
|
}
|
||||||
|
.tab-section {
|
||||||
|
@extend %tab-section;
|
||||||
|
/* this keeps in-tab-section toolbars flush to the top, see Node Detail > Services */
|
||||||
|
margin-top: 0 !important;
|
||||||
|
}
|
||||||
%with-animated-tab-selection ul::after,
|
%with-animated-tab-selection ul::after,
|
||||||
%tab-button-selected {
|
%tab-button-selected {
|
||||||
@extend %frame-brand-300;
|
@extend %frame-brand-300;
|
|
@ -1,5 +1,6 @@
|
||||||
%tab-nav {
|
%tab-nav {
|
||||||
clear: both;
|
clear: both;
|
||||||
|
overflow: scroll;
|
||||||
}
|
}
|
||||||
%tab-nav ul {
|
%tab-nav ul {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
|
@ -1,4 +0,0 @@
|
||||||
<input onchange={{action onchange}} type="radio" name="radiogroup_{{name}}" id="radiogroup_{{name}}_{{slugify id}}" value={{id}} checked={{if selected 'checked'}} />
|
|
||||||
<div role="tabpanel" id="radiogroup_{{name}}_{{id}}_panel">
|
|
||||||
{{yield}}
|
|
||||||
</div>
|
|
|
@ -1,11 +0,0 @@
|
||||||
import Component from '@ember/component';
|
|
||||||
import { computed } from '@ember/object';
|
|
||||||
|
|
||||||
export default Component.extend({
|
|
||||||
classNames: ['tab-section'],
|
|
||||||
'data-test-radiobutton': computed('name,id', function() {
|
|
||||||
return `${this.name}_${this.id}`;
|
|
||||||
}),
|
|
||||||
name: 'tab',
|
|
||||||
onchange: function() {},
|
|
||||||
});
|
|
|
@ -11,5 +11,4 @@
|
||||||
@import './radio-group/index';
|
@import './radio-group/index';
|
||||||
@import './sliding-toggle/index';
|
@import './sliding-toggle/index';
|
||||||
@import './table/index';
|
@import './table/index';
|
||||||
@import './tabs/index';
|
|
||||||
@import './toggle-button/index';
|
@import './toggle-button/index';
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
@import './components/buttons';
|
@import './components/buttons';
|
||||||
@import './components/composite-row';
|
@import './components/composite-row';
|
||||||
@import './components/secret-button';
|
@import './components/secret-button';
|
||||||
@import './components/tabs';
|
|
||||||
@import './components/pill';
|
@import './components/pill';
|
||||||
@import './components/table';
|
@import './components/table';
|
||||||
@import './components/tag-list';
|
@import './components/tag-list';
|
||||||
|
@ -53,6 +52,7 @@
|
||||||
@import 'consul-ui/components/filter-bar';
|
@import 'consul-ui/components/filter-bar';
|
||||||
@import 'consul-ui/components/freetext-filter';
|
@import 'consul-ui/components/freetext-filter';
|
||||||
@import 'consul-ui/components/informed-action';
|
@import 'consul-ui/components/informed-action';
|
||||||
|
@import 'consul-ui/components/tab-nav';
|
||||||
|
|
||||||
@import 'consul-ui/components/consul/tomography/graph';
|
@import 'consul-ui/components/consul/tomography/graph';
|
||||||
@import 'consul-ui/components/consul/discovery-chain';
|
@import 'consul-ui/components/consul/discovery-chain';
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
.tab-nav {
|
|
||||||
@extend %tab-nav;
|
|
||||||
}
|
|
||||||
%tab-nav.animatable {
|
|
||||||
@extend %with-animated-tab-selection;
|
|
||||||
}
|
|
||||||
.tab-section {
|
|
||||||
@extend %tab-section;
|
|
||||||
/* this keeps in-tab-section toolbars flush to the top, see Node Detail > Services */
|
|
||||||
margin-top: 0 !important;
|
|
||||||
}
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="tags" class="tab-section">
|
<div id="topology" class="tab-section">
|
||||||
<div role="tabpanel">
|
<div role="tabpanel">
|
||||||
{{#if topology.FilteredByACLs}}
|
{{#if topology.FilteredByACLs}}
|
||||||
<TopologyMetrics::Notice::LimitedAccess />
|
<TopologyMetrics::Notice::LimitedAccess />
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
import { module, test } from 'qunit';
|
|
||||||
import { setupRenderingTest } from 'ember-qunit';
|
|
||||||
import { render } from '@ember/test-helpers';
|
|
||||||
import hbs from 'htmlbars-inline-precompile';
|
|
||||||
|
|
||||||
module('Integration | Component | tab section', function(hooks) {
|
|
||||||
setupRenderingTest(hooks);
|
|
||||||
|
|
||||||
test('it renders', async function(assert) {
|
|
||||||
// Set any properties with this.set('myProperty', 'value');
|
|
||||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
|
||||||
|
|
||||||
await render(hbs`{{tab-section}}`);
|
|
||||||
|
|
||||||
assert.dom('*').hasText('');
|
|
||||||
|
|
||||||
// Template block usage:
|
|
||||||
await render(hbs`
|
|
||||||
{{#tab-section}}
|
|
||||||
template block text
|
|
||||||
{{/tab-section}}
|
|
||||||
`);
|
|
||||||
|
|
||||||
assert.dom('*').hasText('template block text');
|
|
||||||
});
|
|
||||||
});
|
|
Loading…
Reference in New Issue