Skip to content

Commit 48ce152

Browse files
committed
[PRAC/cont] Add "add-btn" to DOM
Initial organization of the btn (next modal window) for adding clients. Worth noting: - reasoning about the number of modal windows (total). core: B-3 / JS-BL
1 parent b576bd6 commit 48ce152

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.crm__add-data {}
2+
3+
.crm__add-container {
4+
display: flex;
5+
justify-content: center;
6+
align-items: center;
7+
padding-right: var(--container-padding);
8+
padding-left: var(--container-padding);
9+
}
10+
11+
.crm__add-btn {
12+
border: 1px solid var(--main-purple);
13+
padding: 12px 25px;
14+
min-width: 217px;
15+
/* min-height: 47px; */
16+
font-family: var(--open-sans), sans-serif;
17+
font-weight: var(--semi-bold);
18+
font-size: var(--default-fs);
19+
color: var(--main-purple);
20+
background: transparent;
21+
}

core-courses/3-js-basic-level/practicum-js-basic-level/sb-crm-client/css/style.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
@import url("crm.css");
55
@import url("crm-search.css");
66
@import url("crm-output.css");
7+
@import url("crm-add.css");
78
@import url("custom-tippy.css");

core-courses/3-js-basic-level/practicum-js-basic-level/sb-crm-client/js/index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,18 @@
221221
outputTable.append(outTableHead, outTableBody);
222222
crmOutputContainer.append(outputTitleWrap, outputTable);
223223

224+
// организация кнопки/модального окна для добавления клиентов (удаления/изменения)
225+
const addBtnWrap = document.createElement('div');
226+
const addBtn = document.createElement('button');
227+
const addModalWrap = document.createElement('div');
228+
229+
addBtn.classList.add('crm__add-btn');
230+
231+
addBtn.textContent = 'Добавить клиента';
232+
233+
addBtnWrap.append(addBtn, addModalWrap);
234+
crmAddContainer.append(addBtnWrap);
235+
224236
// основные блоки/составляющие элементы приложения
225237
crm.append(crmSearch, crmOutput, crmAdd);
226238

0 commit comments

Comments
 (0)