added templates component
This commit is contained in:
@ -0,0 +1,6 @@
|
||||
<script src="rb-table.component.ts"></script>
|
||||
<div class="table-wrapper">
|
||||
<table>
|
||||
<ng-content></ng-content>
|
||||
</table>
|
||||
</div>
|
35
src/app/rb-custom-inputs/rb-table/rb-table.component.scss
Normal file
35
src/app/rb-custom-inputs/rb-table/rb-table.component.scss
Normal file
@ -0,0 +1,35 @@
|
||||
@import "~@inst-iot/bosch-angular-ui-components/styles/variables/colors";
|
||||
|
||||
.table-wrapper {
|
||||
overflow-x: auto;
|
||||
width: 100%;
|
||||
|
||||
&, & > table { // scrollbar at the top
|
||||
transform:rotateX(180deg);
|
||||
-ms-transform:rotateX(180deg); /* IE 9 */
|
||||
-webkit-transform:rotateX(180deg); /* Safari and Chrome */
|
||||
}
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
|
||||
::ng-deep tr {
|
||||
border-bottom: 1px solid $color-gray-mercury;
|
||||
|
||||
::ng-deep td, ::ng-deep th {
|
||||
padding: 8px 5px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
max-width: 200px;
|
||||
}
|
||||
|
||||
::ng-deep th {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
25
src/app/rb-custom-inputs/rb-table/rb-table.component.spec.ts
Normal file
25
src/app/rb-custom-inputs/rb-table/rb-table.component.spec.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { RbTableComponent } from './rb-table.component';
|
||||
|
||||
describe('RbTableComponent', () => {
|
||||
let component: RbTableComponent;
|
||||
let fixture: ComponentFixture<RbTableComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ RbTableComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(RbTableComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
16
src/app/rb-custom-inputs/rb-table/rb-table.component.ts
Normal file
16
src/app/rb-custom-inputs/rb-table/rb-table.component.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
// tslint:disable-next-line:component-selector
|
||||
selector: 'rb-table',
|
||||
templateUrl: './rb-table.component.html',
|
||||
styleUrls: ['./rb-table.component.scss']
|
||||
})
|
||||
export class RbTableComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user