-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: extract semantic methods & add missing assets
- Loading branch information
1 parent
57cf217
commit f529b03
Showing
22 changed files
with
135 additions
and
57 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
34 changes: 31 additions & 3 deletions
34
...src/app/choice-assistant/infra/ui/simple-choice-picker/simple-choice-picker.component.css
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 |
---|---|---|
@@ -1,4 +1,32 @@ | ||
.selected { | ||
background-color: #1d4ed8; /* Azul tailwind */ | ||
color: white; | ||
.section { | ||
@apply border p-4 rounded-lg; | ||
|
||
.title { | ||
@apply text-xl font-semibold mb-4; | ||
} | ||
|
||
.grid-container { | ||
@apply grid grid-cols-2 gap-4 text-center content-stretch; | ||
|
||
.choice-item { | ||
@apply relative flex flex-col items-center justify-center; | ||
@apply bg-gray-200 border-2 border-purple-500 rounded-lg cursor-pointer transition-all duration-200 p-8; | ||
} | ||
|
||
.icon { | ||
@apply w-12 h-12 mb-2; | ||
} | ||
|
||
.checkmark { | ||
@apply absolute top-0 right-0 px-2 py-1 m-2 text-white bg-green-500 rounded-full; | ||
} | ||
|
||
.choice-text { | ||
@apply text-sm font-medium; | ||
} | ||
|
||
.selected { | ||
@apply bg-purple-500 text-white; | ||
} | ||
} | ||
} |
26 changes: 13 additions & 13 deletions
26
...rc/app/choice-assistant/infra/ui/simple-choice-picker/simple-choice-picker.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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
<div class="border p-4 rounded-lg"> | ||
<h2 class="text-xl font-semibold mb-4">{{title()}}</h2> | ||
<div class="grid grid-cols-2 gap-4 text-center content-stretch"> | ||
<section class="section"> | ||
<h2 class="title">{{title()}}</h2> | ||
<div class="grid-container"> | ||
@for (choice of config().choices; track $index) { | ||
<div aria-hidden="true" | ||
class="relative flex flex-col items-center justify-center bg-gray-200 rounded-lg cursor-pointer transition-all duration-200 p-8" | ||
(click)="pickChoice(choice)" [class.selected]="isPicked(choice)" [class.bg-blue-500]="isPicked(choice)" | ||
[class.text-white]="isPicked(choice)" [class.bg-gray-200]="!isPicked(choice)"> | ||
class="choice-item" | ||
(click)="pickChoice(choice)" | ||
[class.selected]="isPicked(choice)" | ||
[class.bg-purple-500]="isPicked(choice)" | ||
[class.text-white]="isPicked(choice)" | ||
[class.bg-gray-200]="!isPicked(choice)"> | ||
|
||
<img [src]="choice.icon" alt="" class="w-12 h-12 mb-2" width="50px" height="50px"> | ||
<img [src]="choice.icon" alt="" class="icon" width="50px" height="50px"> | ||
|
||
@if (isPicked(choice)) { | ||
<div class="absolute top-0 right-0 px-2 py-1 m-2 text-white bg-green-500 rounded-full"> | ||
✓ | ||
</div> | ||
<div class="checkmark"> ✓ </div> | ||
} | ||
|
||
<!-- Texto --> | ||
<span class="text-sm font-medium">{{choice.displayText}}</span> | ||
<span class="choice-text">{{choice.displayText}}</span> | ||
</div> | ||
} | ||
</div> | ||
</div> | ||
</section> |
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