rename vanilla to "no framework"
This commit is contained in:
parent
e2c1bd2537
commit
58298a15e7
@ -56,7 +56,7 @@ function App() {
|
|||||||
);
|
);
|
||||||
const [outputSettings, setOutputSettings] = useState<OutputSettings>({
|
const [outputSettings, setOutputSettings] = useState<OutputSettings>({
|
||||||
css: CSSOption.TAILWIND,
|
css: CSSOption.TAILWIND,
|
||||||
js: JSFrameworkOption.VANILLA,
|
js: JSFrameworkOption.NO_FRAMEWORK,
|
||||||
});
|
});
|
||||||
const [shouldIncludeResultImage, setShouldIncludeResultImage] =
|
const [shouldIncludeResultImage, setShouldIncludeResultImage] =
|
||||||
useState<boolean>(false);
|
useState<boolean>(false);
|
||||||
|
|||||||
@ -6,7 +6,6 @@ import {
|
|||||||
SelectTrigger,
|
SelectTrigger,
|
||||||
} from "./ui/select";
|
} from "./ui/select";
|
||||||
import { CSSOption, JSFrameworkOption, OutputSettings } from "../types";
|
import { CSSOption, JSFrameworkOption, OutputSettings } from "../types";
|
||||||
import { capitalize } from "../lib/utils";
|
|
||||||
import toast from "react-hot-toast";
|
import toast from "react-hot-toast";
|
||||||
import { Label } from "@radix-ui/react-label";
|
import { Label } from "@radix-ui/react-label";
|
||||||
import { Button } from "./ui/button";
|
import { Button } from "./ui/button";
|
||||||
@ -23,6 +22,17 @@ function displayCSSOption(option: CSSOption) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function displayJSOption(option: JSFrameworkOption) {
|
||||||
|
switch (option) {
|
||||||
|
case JSFrameworkOption.REACT:
|
||||||
|
return "React";
|
||||||
|
case JSFrameworkOption.NO_FRAMEWORK:
|
||||||
|
return "No Framework";
|
||||||
|
default:
|
||||||
|
return option;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function convertStringToCSSOption(option: string) {
|
function convertStringToCSSOption(option: string) {
|
||||||
switch (option) {
|
switch (option) {
|
||||||
case "tailwind":
|
case "tailwind":
|
||||||
@ -46,7 +56,7 @@ function generateDisplayString(settings: OutputSettings) {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
} else if (
|
} else if (
|
||||||
settings.js === JSFrameworkOption.VANILLA &&
|
settings.js === JSFrameworkOption.NO_FRAMEWORK &&
|
||||||
settings.css === CSSOption.TAILWIND
|
settings.css === CSSOption.TAILWIND
|
||||||
) {
|
) {
|
||||||
return (
|
return (
|
||||||
@ -56,7 +66,7 @@ function generateDisplayString(settings: OutputSettings) {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
} else if (
|
} else if (
|
||||||
settings.js === JSFrameworkOption.VANILLA &&
|
settings.js === JSFrameworkOption.NO_FRAMEWORK &&
|
||||||
settings.css === CSSOption.BOOTSTRAP
|
settings.css === CSSOption.BOOTSTRAP
|
||||||
) {
|
) {
|
||||||
return (
|
return (
|
||||||
@ -135,12 +145,12 @@ function OutputSettingsSection({ outputSettings, setOutputSettings }: Props) {
|
|||||||
className="col-span-2 h-8"
|
className="col-span-2 h-8"
|
||||||
id="output-settings-js"
|
id="output-settings-js"
|
||||||
>
|
>
|
||||||
{capitalize(outputSettings.js)}
|
{displayJSOption(outputSettings.js)}
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectGroup>
|
<SelectGroup>
|
||||||
<SelectItem value={JSFrameworkOption.VANILLA}>
|
<SelectItem value={JSFrameworkOption.NO_FRAMEWORK}>
|
||||||
Vanilla
|
No Framework
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
<SelectItem value={JSFrameworkOption.REACT}>
|
<SelectItem value={JSFrameworkOption.REACT}>
|
||||||
React
|
React
|
||||||
|
|||||||
@ -9,7 +9,7 @@ export enum CSSOption {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export enum JSFrameworkOption {
|
export enum JSFrameworkOption {
|
||||||
VANILLA = "vanilla",
|
NO_FRAMEWORK = "vanilla",
|
||||||
REACT = "react",
|
REACT = "react",
|
||||||
VUE = "vue",
|
VUE = "vue",
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user