Skip to content

Commit bb27728

Browse files
committed
add style
1 parent f565c5f commit bb27728

File tree

4 files changed

+40
-22
lines changed

4 files changed

+40
-22
lines changed

admin/app/components/quests/form.gjs

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ import PixButton from '@1024pix/pix-ui/components/pix-button';
33
import PixButtonLink from '@1024pix/pix-ui/components/pix-button-link';
44
import PixInput from '@1024pix/pix-ui/components/pix-input';
55
import PixTextarea from '@1024pix/pix-ui/components/pix-textarea';
6-
import PageTitle from '../ui/page-title';
76
import { fn } from '@ember/helper';
87
import { on } from '@ember/modifier';
98
import { action } from '@ember/object';
109
import { service } from '@ember/service';
1110
import Component from '@glimmer/component';
1211
import { tracked } from '@glimmer/tracking';
1312

13+
import PageTitle from '../ui/page-title';
14+
1415
const LOCAL_STORAGE_KEY = 'QUEST_REQUIREMENT_SNIPPETS';
1516

1617
export default class QuestForm extends Component {

admin/app/components/quests/requirements/form.gjs

+26-20
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import PixBlock from '@1024pix/pix-ui/components/pix-block';
22
import PixButtonLink from '@1024pix/pix-ui/components/pix-button-link';
33
import PixSelect from '@1024pix/pix-ui/components/pix-select';
4-
import PageTitle from '../../ui/page-title';
54
import { action } from '@ember/object';
65
import { service } from '@ember/service';
76
import Component from '@glimmer/component';
@@ -10,6 +9,8 @@ import { runTask } from 'ember-lifeline';
109
import ObjectRequirementForm from 'pix-admin/components/quests/requirements/object/form';
1110
import { objectConfigurations } from 'pix-admin/components/quests/requirements/object/object-configuration.js';
1211

12+
import PageTitle from '../../ui/page-title';
13+
1314
export default class RequirementForm extends Component {
1415
@tracked selectedRequirementType = null;
1516
@service router;
@@ -39,26 +40,31 @@ export default class RequirementForm extends Component {
3940
<PageTitle>
4041
<:title>Créer ou Éditer un "requirement" de quête</:title>
4142
</PageTitle>
42-
<PixBlock @variant="admin" class="quest-requirement-form">
43-
<PixSelect
44-
@onChange={{this.updateRequirementType}}
45-
@value={{this.selectedRequirementType}}
46-
@options={{this.requirementTypeOptions}}
47-
@placeholder="Choisissez votre type de requirement"
48-
@hideDefaultOption={{true}}
49-
>
50-
<:label>Sélectionner un type de requirement</:label>
51-
</PixSelect>
43+
<section class="quest-object-form">
44+
<PixBlock @variant="admin" class="quest-requirement-form">
45+
<PixSelect
46+
class="quest-requirement-form__item-width-content"
47+
@onChange={{this.updateRequirementType}}
48+
@value={{this.selectedRequirementType}}
49+
@options={{this.requirementTypeOptions}}
50+
@placeholder="Choisissez votre type de requirement"
51+
@hideDefaultOption={{true}}
52+
>
53+
<:label>Sélectionner un type de requirement</:label>
54+
</PixSelect>
5255

53-
<div>
54-
{{#if this.selectedRequirementType}}
55-
<ObjectRequirementForm @configuration={{this.configurationForSelectedRequirement}} />
56-
{{/if}}
57-
</div>
56+
<div>
57+
{{#if this.selectedRequirementType}}
58+
<ObjectRequirementForm @configuration={{this.configurationForSelectedRequirement}} />
59+
{{/if}}
60+
</div>
61+
</PixBlock>
5862

59-
<PixButtonLink @route="authenticated.quest-creator" @size="small" @variant="primary">
60-
Revenir au formulaire de quête
61-
</PixButtonLink>
62-
</PixBlock>
63+
<div class="quest-button-edition__button">
64+
<PixButtonLink @route="authenticated.quest-creator" @size="small" @variant="primary">
65+
Revenir au formulaire de quête
66+
</PixButtonLink>
67+
</div>
68+
</section>
6369
</template>
6470
}

admin/app/components/quests/requirements/object/form.gjs

+6-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,12 @@ export default class ObjectRequirementCreateOrEditForm extends Component {
7474

7575
<template>
7676
<form class="quest-object-form" {{on "submit" this.saveSnippet}}>
77-
<PixInput onchange={{this.updateLabel}} required={{true}} aria-required={{true}}>
77+
<PixInput
78+
class="quest-requirement-form__item-width-content"
79+
onchange={{this.updateLabel}}
80+
required={{true}}
81+
aria-required={{true}}
82+
>
7883
<:label>Nom de la condition</:label>
7984
</PixInput>
8085

admin/app/styles/components/quests/form.scss

+6
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
&__button {
2020
display: flex;
21+
flex-wrap: wrap;
2122
gap: 24px;
2223
justify-content: center;
2324
}
@@ -27,6 +28,11 @@
2728
display: flex;
2829
flex-direction: column;
2930
gap: 24px;
31+
32+
&__item-width-content {
33+
width: 50%;
34+
min-width: fit-content;
35+
}
3036
}
3137

3238
.quest-object-form {

0 commit comments

Comments
 (0)