Skip to content

Commit 079ec4f

Browse files
authored
Merge pull request #629 from framer/csv-import-move-icon
CSV Import: move CMS icon into dropdown
2 parents 7c43b7f + 802170d commit 079ec4f

3 files changed

Lines changed: 21 additions & 13 deletions

File tree

plugins/csv-import/src/App.css

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ body {
126126
align-items: center;
127127
gap: 10px;
128128
width: 100%;
129+
position: relative;
130+
color: var(--framer-color-text);
129131
}
130132

131133
.collection-icon-container {
@@ -134,7 +136,9 @@ body {
134136
justify-content: center;
135137
width: 20px;
136138
height: 20px;
137-
opacity: 0.5;
139+
position: absolute;
140+
left: 8px;
141+
top: 5px;
138142
}
139143

140144
.collection-creation-container {
@@ -147,22 +151,29 @@ body {
147151
.collection-select {
148152
flex: 1;
149153
min-width: 0;
150-
height: 28px;
154+
padding-left: 33px;
151155
}
152156

153-
.collection-select.error {
157+
.collection-selector.error {
154158
color: #f36;
155-
background-color: color-mix(in srgb, #f36 10%, transparent);
156-
box-shadow: inset 0 0 0 1px #f36;
159+
}
160+
161+
.collection-selector.error .collection-select {
162+
color: inherit;
163+
background-color: color-mix(in srgb, currentColor 10%, transparent);
164+
box-shadow: inset 0 0 0 1px currentColor;
165+
}
166+
167+
select.collection-select {
168+
padding-bottom: 0;
157169
}
158170

159171
input.collection-select {
160-
padding: 0px 16px 1px 8px;
172+
padding-left: 33px;
161173
}
162174

163175
.error-message {
164176
color: #f36;
165-
padding-left: 30px;
166177
}
167178

168179
/* Manage conflicts screen */

plugins/csv-import/src/components/CollectionIcon.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import type { SVGProps } from "react"
2-
3-
export function CollectionIcon(props: SVGProps<SVGSVGElement>) {
1+
export function CollectionIcon() {
42
return (
53
<svg
64
xmlns="http://www.w3.org/2000/svg"
@@ -10,7 +8,6 @@ export function CollectionIcon(props: SVGProps<SVGSVGElement>) {
108
fill="none"
119
role="presentation"
1210
aria-hidden="true"
13-
{...props}
1411
>
1512
<path
1613
d="M 6 0.5 C 8.761 0.5 11 1.619 11 3 C 11 4.381 8.761 5.5 6 5.5 C 3.239 5.5 1 4.381 1 3 C 1 1.619 3.239 0.5 6 0.5 Z"

plugins/csv-import/src/components/CollectionSelector.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,15 @@ export function CollectionSelector({ forceCreate, collection, onCollectionChange
124124
if (isCreatingNew) {
125125
return (
126126
<div className="collection-creation-container">
127-
<div className="collection-selector">
127+
<div className={creationError ? "collection-selector error" : "collection-selector"}>
128128
<div className="collection-icon-container">
129129
<CollectionIcon />
130130
</div>
131131

132132
<input
133133
ref={inputRef}
134134
type="text"
135-
className={creationError ? "collection-select error" : "collection-select"}
135+
className="collection-select"
136136
value={newCollectionName}
137137
onChange={handleCollectionNameChange}
138138
onKeyDown={handleKeyDown}

0 commit comments

Comments
 (0)