Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#25276 Adding initial code preview works
- Loading branch information
1 parent
524e70e
commit cf1f556
Showing
15 changed files
with
210 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 9 additions & 2 deletions
11
...ents/dot-edit-page-state-controller-seo/dot-edit-page-state-controller-seo.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
core-web/libs/ui/src/lib/dot-tab-buttons/dot-tab-buttons.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<div class="dot-tab-buttons"> | ||
<div style="position: relative"> | ||
<button | ||
class="dot-tab-button" | ||
[ngClass]="{ 'dot-tab-button-hover': mode === pageMode.EDIT }" | ||
[value]="pageMode.EDIT" | ||
(click)="onChangeState($event)" | ||
> | ||
Edit | ||
</button> | ||
<div class="dot-tab-buttons-select" *ngIf="mode === pageMode.EDIT"></div> | ||
</div> | ||
|
||
<div style="position: relative"> | ||
<div | ||
class="dot-button-dropdown" | ||
[ngClass]="{ 'dot-tab-button-hover': mode === pageMode.PREVIEW }" | ||
(click)="onChangeState($event)" | ||
> | ||
<button class="dot-tab-button__right" [value]="pageMode.PREVIEW">Preview</button> | ||
<button | ||
class="dot-tab-dropdown" | ||
[ngClass]="{ 'dot-tab-button-hover-dropdown': mode === pageMode.PREVIEW }" | ||
> | ||
<i [class]="icon"></i> | ||
</button> | ||
</div> | ||
<div class="dot-tab-buttons-select" *ngIf="mode === pageMode.PREVIEW"></div> | ||
</div> | ||
</div> |
62 changes: 62 additions & 0 deletions
62
core-web/libs/ui/src/lib/dot-tab-buttons/dot-tab-buttons.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
@use "variables" as *; | ||
|
||
.dot-tab-buttons { | ||
display: flex; | ||
flex-direction: row; | ||
gap: 0.25rem; | ||
margin-right: 2rem; | ||
} | ||
|
||
.dot-tab-button { | ||
border: 1.5px solid $color-palette-gray-200; | ||
color: $color-palette-primary-500; | ||
background-color: transparent; | ||
padding: 0.5rem $spacing-3; | ||
border-radius: 0.375rem; | ||
height: 2.5rem; | ||
} | ||
|
||
.dot-tab-button__right { | ||
border: 1.5px solid $color-palette-gray-200; | ||
color: $color-palette-primary-500; | ||
background-color: transparent; | ||
padding: 0 0.5rem 0 1rem; | ||
height: 2.5rem; | ||
border-right: 0; | ||
border-top-left-radius: 0.375rem; | ||
border-bottom-left-radius: 0.375rem; | ||
} | ||
|
||
.dot-tab-dropdown { | ||
background-color: transparent; | ||
border: 1.5px solid $color-palette-gray-200; | ||
height: 2.5rem; | ||
border-top-right-radius: 0.375rem; | ||
border-bottom-right-radius: 0.375rem; | ||
border-left: 0; | ||
padding: 0.5rem; | ||
color: $color-palette-primary-500; | ||
} | ||
|
||
.dot-button-dropdown { | ||
display: flex; | ||
} | ||
|
||
.dot-tab-buttons-select { | ||
height: 0.25rem; | ||
border-radius: 6.25rem; | ||
width: auto; | ||
background-color: $color-palette-primary-500; | ||
left: 0; | ||
right: 0; | ||
bottom: -0.6rem; | ||
position: absolute; | ||
} | ||
|
||
.dot-tab-button-hover { | ||
background: $color-palette-primary-100; | ||
} | ||
|
||
.dot-tab-button-hover-dropdown { | ||
background: $color-palette-primary-200; | ||
} |
22 changes: 22 additions & 0 deletions
22
core-web/libs/ui/src/lib/dot-tab-buttons/dot-tab-buttons.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { DotTabButtonsComponent } from './dot-tab-buttons.component'; | ||
|
||
describe('DotTabButtonsComponent', () => { | ||
let component: DotTabButtonsComponent; | ||
let fixture: ComponentFixture<DotTabButtonsComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [DotTabButtonsComponent] | ||
}).compileComponents(); | ||
|
||
fixture = TestBed.createComponent(DotTabButtonsComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
Oops, something went wrong.