Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions plugins/csv-import/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ body {
align-items: center;
gap: 10px;
width: 100%;
position: relative;
color: var(--framer-color-text);
}

.collection-icon-container {
Expand All @@ -134,7 +136,9 @@ body {
justify-content: center;
width: 20px;
height: 20px;
opacity: 0.5;
position: absolute;
left: 8px;
top: 5px;
}

.collection-creation-container {
Expand All @@ -147,22 +151,29 @@ body {
.collection-select {
flex: 1;
min-width: 0;
height: 28px;
padding-left: 33px;
}

.collection-select.error {
.collection-selector.error {
color: #f36;
background-color: color-mix(in srgb, #f36 10%, transparent);
box-shadow: inset 0 0 0 1px #f36;
}

.collection-selector.error .collection-select {
color: inherit;
background-color: color-mix(in srgb, currentColor 10%, transparent);
box-shadow: inset 0 0 0 1px currentColor;
}

select.collection-select {
padding-bottom: 0;
}

input.collection-select {
padding: 0px 16px 1px 8px;
padding-left: 33px;
}

.error-message {
color: #f36;
padding-left: 30px;
}

/* Manage conflicts screen */
Expand Down
26 changes: 21 additions & 5 deletions plugins/csv-import/src/components/CollectionIcon.tsx
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
export function CollectionIcon({ color = "currentColor" }: { color?: string }) {
export function CollectionIcon() {
return (
<svg xmlns="http://www.w3.org/2000/svg" width="10" height="12" fill="none" overflow="visible">
<svg
xmlns="http://www.w3.org/2000/svg"
width={12}
height={12}
viewBox="0 0 12 12"
fill="none"
role="presentation"
aria-hidden="true"
>
<path
d="M 5 0 C 7.762 0 10 1.119 10 2.5 C 10 3.881 7.762 5 5 5 C 2.239 5 0 3.881 0 2.5 C 0 1.119 2.239 0 5 0 Z M 10 6 C 10 7.381 7.762 8.5 5 8.5 C 2.239 8.5 0 7.381 0 6 L 0 4 C 0 5.381 2.239 6.5 5 6.5 C 7.762 6.5 10 5.381 10 4 Z M 10 9.5 C 10 10.881 7.762 12 5 12 C 2.239 12 0 10.881 0 9.5 L 0 7.5 C 0 8.881 2.239 10 5 10 C 7.762 10 10 8.881 10 7.5 Z"
fill={color}
></path>
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"
fill="currentColor"
/>
<path
d="M 11 6 C 11 7.381 8.761 8.5 6 8.5 C 3.239 8.5 1 7.381 1 6 C 1 5.711 1.098 5.433 1.278 5.175 C 2.377 5.991 4.084 6.515 6 6.515 C 7.916 6.515 9.623 5.991 10.722 5.175 C 10.902 5.433 11 5.711 11 6 Z"
fill="currentColor"
/>
<path
d="M 11 9 C 11 10.381 8.761 11.5 6 11.5 C 3.239 11.5 1 10.381 1 9 C 1 8.711 1.098 8.433 1.278 8.175 C 2.377 8.991 4.084 9.515 6 9.515 C 7.916 9.515 9.623 8.991 10.722 8.175 C 10.902 8.433 11 8.711 11 9 Z"
fill="currentColor"
/>
</svg>
)
}
4 changes: 2 additions & 2 deletions plugins/csv-import/src/components/CollectionSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,15 @@ export function CollectionSelector({ forceCreate, collection, onCollectionChange
if (isCreatingNew) {
return (
<div className="collection-creation-container">
<div className="collection-selector">
<div className={creationError ? "collection-selector error" : "collection-selector"}>
<div className="collection-icon-container">
<CollectionIcon />
</div>

<input
ref={inputRef}
type="text"
className={creationError ? "collection-select error" : "collection-select"}
className="collection-select"
value={newCollectionName}
onChange={handleCollectionNameChange}
onKeyDown={handleKeyDown}
Expand Down
Loading