-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(learnings): update learnings with keymap and updat readme and ro…
…admap
- Loading branch information
Mathieu Hermann
committed
Nov 14, 2024
1 parent
535b4de
commit e9d5c0e
Showing
8 changed files
with
175 additions
and
52 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
10 changes: 10 additions & 0 deletions
10
src/app/common/components/expander/expander.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,10 @@ | ||
<div class="header" (click)="expanded.set(!expanded())"> | ||
<div class="retro-subtitle">{{ title() }}</div> | ||
<app-button-icon | ||
class="tertiary" | ||
icon="keyboard_arrow_down" | ||
></app-button-icon> | ||
</div> | ||
<div class="content"> | ||
<ng-content></ng-content> | ||
</div> |
38 changes: 38 additions & 0 deletions
38
src/app/common/components/expander/expander.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,38 @@ | ||
:host { | ||
display: flex; | ||
flex-direction: column; | ||
flex: 0 0 auto; | ||
overflow: hidden; | ||
|
||
&.expanded { | ||
.content { | ||
height: fit-content; | ||
} | ||
|
||
.header { | ||
app-button-icon { | ||
transform: rotate(180deg); | ||
} | ||
} | ||
} | ||
|
||
.header { | ||
display: flex; | ||
flex: 1 1 auto; | ||
align-items: center; | ||
justify-content: space-between; | ||
cursor: pointer; | ||
|
||
app-button-icon { | ||
transition: var(--transition-time) ease; | ||
} | ||
} | ||
|
||
.content { | ||
display: flex; | ||
flex-direction: column; | ||
height: 0px; | ||
overflow: hidden; | ||
transition: max-height var(--transition-time) ease-in-out; | ||
} | ||
} |
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,18 @@ | ||
import { ChangeDetectionStrategy, Component, HostBinding, input, model, signal } from '@angular/core'; | ||
import { ButtonIconComponent } from '../button-icon/button-icon.component'; | ||
|
||
@Component({ | ||
selector: 'app-expander', | ||
standalone: true, | ||
imports: [ButtonIconComponent], | ||
templateUrl: './expander.component.html', | ||
styleUrl: './expander.component.scss', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
host: { | ||
'[class.expanded]': 'expanded()' | ||
} | ||
}) | ||
export class ExpanderComponent { | ||
public title = input.required<string>(); | ||
public expanded = model<boolean>(false); | ||
} |
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