fix annoying div

This commit is contained in:
Jade (Rose) Rowland 2024-01-20 18:14:42 -05:00
parent 6c28398d20
commit 1146f6ba52

View file

@ -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">