Skip to content

Commit

Permalink
Theme UI colors ajustments
Browse files Browse the repository at this point in the history
  • Loading branch information
RodrigoLuglio committed Sep 19, 2024
1 parent 80a5922 commit d36207b
Show file tree
Hide file tree
Showing 8 changed files with 2,024 additions and 1,987 deletions.
Binary file modified bun.lockb
Binary file not shown.
34 changes: 17 additions & 17 deletions src/components/ExportButton.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import React from "react";
import { useTheme } from "@/contexts/ThemeContext";
import { generateThemeJSON } from "@/lib/utils/exportTheme";
import React from 'react'
import { useTheme } from '@/contexts/ThemeContext'
import { generateThemeJSON } from '@/lib/utils/exportTheme'

import { Button } from "@/components/ui/button";
import { Button } from '@/components/ui/button'

const ExportButton: React.FC = () => {
const { colors, syntaxColors, ansiColors } = useTheme();
const { colors, syntaxColors, ansiColors } = useTheme()

const exportTheme = () => {
const themeJSON = generateThemeJSON(colors, syntaxColors, ansiColors);
const blob = new Blob([themeJSON], { type: "application/json" });
const url = URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url;
a.download = "generated-theme.json";
a.click();
URL.revokeObjectURL(url);
};
const themeJSON = generateThemeJSON(colors, syntaxColors, ansiColors)
const blob = new Blob([themeJSON], { type: 'application/json' })
const url = URL.createObjectURL(blob)
const a = document.createElement('a')
a.href = url
a.download = 'Generated-color-theme.json'
a.click()
URL.revokeObjectURL(url)
}

return (
<Button className="mt-4" onClick={exportTheme}>
Export Theme
</Button>
);
};
)
}

export default ExportButton;
export default ExportButton
Loading

0 comments on commit d36207b

Please sign in to comment.