fix annoying div
This commit is contained in:
parent
6c28398d20
commit
1146f6ba52
1 changed files with 41 additions and 39 deletions
|
|
@ -106,47 +106,49 @@ export function PatternsTab({ context }) {
|
||||||
onChange={(value) => settingsMap.setKey('patternFilter', value)}
|
onChange={(value) => settingsMap.setKey('patternFilter', value)}
|
||||||
items={patternFilterName}
|
items={patternFilterName}
|
||||||
></ButtonGroup>
|
></ButtonGroup>
|
||||||
<div className="pr-4 space-x-4 border-b border-foreground mb-2 flex max-w-full items-center h-16 overflow-x-auto">
|
<div>
|
||||||
<ActionButton
|
<div className="pr-4 space-x-4 border-b border-foreground flex max-w-full overflow-x-auto">
|
||||||
label="new"
|
<ActionButton
|
||||||
onClick={() => {
|
label="new"
|
||||||
const { data } = userPattern.createAndAddToDB();
|
onClick={() => {
|
||||||
updateCodeWindow(data);
|
const { data } = userPattern.createAndAddToDB();
|
||||||
}}
|
updateCodeWindow(data);
|
||||||
/>
|
}}
|
||||||
<ActionButton
|
|
||||||
label="duplicate"
|
|
||||||
onClick={() => {
|
|
||||||
const { data } = userPattern.duplicate(viewingPatternData);
|
|
||||||
updateCodeWindow(data);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<ActionButton
|
|
||||||
label="delete"
|
|
||||||
onClick={() => {
|
|
||||||
const { data } = userPattern.delete(viewingPatternID);
|
|
||||||
updateCodeWindow({ ...data, collection: userPattern.collection });
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<label className="hover:opacity-50 cursor-pointer">
|
|
||||||
<input
|
|
||||||
style={{ display: 'none' }}
|
|
||||||
type="file"
|
|
||||||
multiple
|
|
||||||
accept="text/plain,application/json"
|
|
||||||
onChange={(e) => importPatterns(e.target.files)}
|
|
||||||
/>
|
/>
|
||||||
import
|
<ActionButton
|
||||||
</label>
|
label="duplicate"
|
||||||
<ActionButton label="export" onClick={exportPatterns} />
|
onClick={() => {
|
||||||
|
const { data } = userPattern.duplicate(viewingPatternData);
|
||||||
|
updateCodeWindow(data);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<ActionButton
|
||||||
|
label="delete"
|
||||||
|
onClick={() => {
|
||||||
|
const { data } = userPattern.delete(viewingPatternID);
|
||||||
|
updateCodeWindow({ ...data, collection: userPattern.collection });
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<label className="hover:opacity-50 cursor-pointer">
|
||||||
|
<input
|
||||||
|
style={{ display: 'none' }}
|
||||||
|
type="file"
|
||||||
|
multiple
|
||||||
|
accept="text/plain,application/json"
|
||||||
|
onChange={(e) => importPatterns(e.target.files)}
|
||||||
|
/>
|
||||||
|
import
|
||||||
|
</label>
|
||||||
|
<ActionButton label="export" onClick={exportPatterns} />
|
||||||
|
|
||||||
<ActionButton
|
<ActionButton
|
||||||
label="delete-all"
|
label="delete-all"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
const { data } = userPattern.clearAll();
|
const { data } = userPattern.clearAll();
|
||||||
updateCodeWindow(data);
|
updateCodeWindow(data);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<section className="flex overflow-y-scroll max-h-full flex-col">
|
<section className="flex overflow-y-scroll max-h-full flex-col">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue