Skip to content

Commit 1c0ee11

Browse files
samiahmedsiddiquiavoidik
authored andcommitted
Fix toggle for AI vs. Search mode (#29243)
1 parent 7f17026 commit 1c0ee11

File tree

3 files changed

+4
-78
lines changed

3 files changed

+4
-78
lines changed
Lines changed: 1 addition & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,4 @@
11
// Kapa modal Styling, used in JS.
2-
.mantine-SegmentedControl-label {
3-
color: #4E5F6D;
4-
font-size: 13px;
5-
font-style: normal;
6-
font-weight: 400;
7-
line-height: 16px;
8-
display: flex;
9-
padding: 4px 12px 4px 8px;
10-
align-items: center;
11-
height: 24px;
12-
gap: 4px;
13-
}
14-
15-
.mantine-Image-imageWrapper img {
2+
.mantine-Image-root img {
163
border-radius: 0;
174
}
18-
19-
.mantine-SegmentedControl-root span {
20-
display: none;
21-
}
22-
23-
.mantine-SegmentedControl-root {
24-
padding: 0;
25-
overflow: visible;
26-
}
27-
28-
.mantine-SegmentedControl-controlActive {
29-
gap: 4px;
30-
background: #fff;
31-
}
32-
33-
.mantine-SegmentedControl-control:not(:last-child) label:before {
34-
content: "";
35-
width: 24px;
36-
height: 24px;
37-
background: url(/icons/ai-icon.svg) center no-repeat;
38-
display: inline-block;
39-
filter: grayscale(1) brightness(1.2);
40-
}
41-
42-
.mantine-SegmentedControl-control:not(:last-child).mantine-SegmentedControl-controlActive label:before {
43-
filter: none;
44-
}
45-
46-
.mantine-SegmentedControl-control:not(:last-child).mantine-SegmentedControl-controlActive label {
47-
background: linear-gradient(273deg, #ED35EC 5.14%, #ED35C5 38.93%, #7879F1 48.17%, #5E60F0 98.9%);
48-
background-clip: text;
49-
-webkit-background-clip: text;
50-
-webkit-text-fill-color: transparent;
51-
font-weight: 600;
52-
}
53-
54-
.mantine-SegmentedControl-control:last-child.mantine-SegmentedControl-controlActive label {
55-
color: #2B59C3;
56-
font-weight: 600;
57-
}
58-
59-
.mantine-SegmentedControl-controlActive {
60-
border-radius: 8px;
61-
box-shadow: 0 0 0 1px #7879F1;
62-
}
63-
64-
.mantine-SegmentedControl-controlActive label {
65-
border-radius: 8px;
66-
border: 0;
67-
font-size: 13px;
68-
font-style: normal;
69-
font-weight: 600;
70-
line-height: 16px;
71-
display: flex;
72-
gap: 4px
73-
}
74-
75-
.mantine-SegmentedControl-control:last-child label {
76-
padding: 4px 12px;
77-
}

docs/layouts/partials/hooks/body-end.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,8 @@
7474
data-query-input-text-color="#0b1117"
7575
data-query-input-placeholder-text-color="#6d7c88"
7676
data-query-input-border-color="#d7dee4"
77-
data-switch-border="1px solid #cbccfb"
78-
data-switch-border-radius="8px"
79-
data-switch-bg-color="#F0F4F7"
77+
data-switch-bg-color="#fff"
78+
data-switch-color="#7879f1"
8079
data-example-question-button-height="36px"
8180
data-example-question-button-border="1px solid #d7dee4"
8281
data-example-question-button-border-radius="8px"

docs/src/algolia-search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import algoliasearch from 'algoliasearch';
4646
const style = document.createElement('style');
4747

4848
// Original (Unminified) file located in `docs/assets/scss/_yb_kapa_modal_styling.scss`.
49-
style.textContent = `.mantine-SegmentedControl-label{color:#4e5f6d;font-size:13px;font-style:normal;font-weight:400;line-height:16px;display:flex;padding:4px 12px 4px 8px;align-items:center;height:24px;gap: 4px}.mantine-Image-imageWrapper img{border-radius:0}.mantine-SegmentedControl-root span{display:none}.mantine-SegmentedControl-root{padding:0;overflow:visible}.mantine-SegmentedControl-controlActive{gap:4px;background:#fff;border-radius:8px;box-shadow:0 0 0 1px #7879f1}.mantine-SegmentedControl-control:not(:last-child) label:before{content:"";width:24px;height:24px;background:url(/icons/ai-icon.svg) center no-repeat;display:inline-block;filter:grayscale(1) brightness(1.2)}.mantine-SegmentedControl-control:not(:last-child).mantine-SegmentedControl-controlActive label:before{filter:none}.mantine-SegmentedControl-control:not(:last-child).mantine-SegmentedControl-controlActive label{background:linear-gradient(273deg,#ed35ec 5.14%,#ed35c5 38.93%,#7879f1 48.17%,#5e60f0 98.9%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-weight:600}.mantine-SegmentedControl-control:last-child.mantine-SegmentedControl-controlActive label{color:#2b59c3;font-weight:600}.mantine-SegmentedControl-controlActive label{border-radius:8px;border:0;font-size:13px;font-style:normal;font-weight:600;line-height:16px;display:flex;gap:4px}.mantine-SegmentedControl-control:last-child label {padding: 4px 12px;}`;
49+
style.textContent = `.mantine-Image-root{border-radius:0}`;
5050

5151
shadowRoot.appendChild(style);
5252
}

0 commit comments

Comments
 (0)