Skip to content

Commit 8d7d790

Browse files
committed
feat: header ui
1 parent 8de564c commit 8d7d790

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

editor/src/App.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -999,8 +999,10 @@ export default function App() {
999999
{theme === 'dark' ? '☀️' : '🌙'}
10001000
</button>
10011001
<div className="h-4 w-px bg-border" />
1002-
<ImportButton onImport={handleImport} />
1003-
<ExportButton schema={schema.schema} />
1002+
<div className="inline-flex rounded-lg border border-border overflow-hidden">
1003+
<ImportButton onImport={handleImport} />
1004+
<ExportButton schema={schema.schema} />
1005+
</div>
10041006
</div>
10051007
</header>
10061008

editor/src/components/ExportButton.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ export function ExportButton({ schema, disabled }: ExportButtonProps) {
1818
<button
1919
onClick={handleExport}
2020
disabled={disabled || !hasFields}
21-
className="flex items-center gap-2 h-7 px-4 bg-emerald-600 hover:bg-emerald-700 disabled:bg-border disabled:text-text-muted disabled:cursor-not-allowed text-white rounded-lg text-xs font-medium transition-colors"
21+
className="flex items-center gap-1.5 h-7 px-3 bg-emerald-600 hover:bg-emerald-700 disabled:bg-border disabled:text-text-muted disabled:cursor-not-allowed text-white text-xs font-medium transition-colors"
2222
title={hasFields ? 'Export .stencil.yaml' : 'Define at least one field to export'}
2323
>
24-
<svg className="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
24+
<svg className="w-3 h-3" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
2525
<path
2626
strokeLinecap="round"
2727
strokeLinejoin="round"
2828
d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
2929
/>
3030
</svg>
31-
Export YAML
31+
Export
3232
</button>
3333
);
3434
}

editor/src/components/ImportButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ export function ImportButton({ onImport }: ImportButtonProps) {
4646
/>
4747
<button
4848
onClick={handleClick}
49-
className="flex items-center gap-1.5 h-7 px-3 rounded-lg text-xs font-medium bg-elevated text-text-secondary border border-border-strong hover:border-border-strong transition-colors"
49+
className="flex items-center gap-1.5 h-7 px-3 text-xs font-medium bg-elevated text-text-secondary border-r border-border hover:bg-surface transition-colors"
5050
title="Import .stencil.yaml"
5151
>
52-
<svg className="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
52+
<svg className="w-3 h-3" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
5353
<path strokeLinecap="round" strokeLinejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12" />
5454
</svg>
5555
Import

0 commit comments

Comments
 (0)