1
0
Fork 0
freesewing/sites/shared/components/workbench/views/print/actions.mjs

29 lines
977 B
JavaScript
Raw Normal View History

import { useTranslation } from 'next-i18next'
import { ClearIcon, ExportIcon } from 'shared/components/icons.mjs'
2023-06-06 11:17:14 -05:00
import { ShowButtonsToggle } from 'shared/components/workbench/pattern/movable/transform-buttons.mjs'
export const ns = ['workbench', 'print']
2023-06-06 11:17:14 -05:00
export const PrintActions = ({ update, ui, exportIt }) => {
// get translation for the menu
const { t } = useTranslation(ns)
const resetLayout = () => update.ui(['layouts', 'print'])
return (
<div className="mt-2 mb-4">
<div className="flex justify-evenly flex-col lg:flex-row">
2023-06-06 11:17:14 -05:00
<ShowButtonsToggle update={update} ui={ui} />
<button className="btn btn-primary btn-outline" onClick={resetLayout}>
<ClearIcon />
<span className="ml-2">{t('reset')}</span>
</button>
<button className="btn btn-primary" onClick={exportIt}>
<ExportIcon />
<span className="ml-2">{t('export')}</span>
</button>
</div>
</div>
)
}