UNPKG

slanted-gamedev-toolz

Version:

A slanted mix of tools for your brilliant ideas in game design.

13 lines (12 loc) 944 B
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime"; import { colors } from "../../theme/palettes/colors"; import { getLocalizedTextRaw } from "../LocalizationSelect/useLocalization"; import { HexBtn } from "../buttons/HexBtn/HexBtn"; import { importExportSaveLocalization } from "./constants/ImportExportLocalization"; export const LoadFileBtns = ({ loadGameFromFile, exportLocalStorageAsFile, }) => { const showSaveFileBtns = true; return (_jsx("div", { style: { display: "flex", justifyContent: "center", }, children: showSaveFileBtns ? (_jsxs(_Fragment, { children: [_jsx(HexBtn, { label: getLocalizedTextRaw(importExportSaveLocalization.saveFile), onClick: exportLocalStorageAsFile, highlight: colors.gold }), _jsx(HexBtn, { label: getLocalizedTextRaw(importExportSaveLocalization.loadFile), onClick: loadGameFromFile, highlight: colors.gold })] })) : null })); };