add reset settings button
This commit is contained in:
parent
5311c667da
commit
d6b037e9ea
5 changed files with 16 additions and 196 deletions
|
@ -68,10 +68,10 @@ const ZoomButtons = ({ t }) => {
|
|||
|
||||
const Spacer = () => <span className="opacity-50">|</span>
|
||||
|
||||
export const ViewHeader = ({ update, settings, ui, control }) => {
|
||||
export const ViewHeader = ({ update, settings, ui, control, setSettings }) => {
|
||||
const { t } = useTranslation(ns)
|
||||
return (
|
||||
<div className="flex flex-row gap-4 py-4 mt-2 pt-4 w-full bg-neutral text-neutral-content items-center justify-center">
|
||||
<div className="flex flex-row flex-wrap gap-4 py-4 mt-2 pt-4 w-full bg-neutral text-neutral-content items-center justify-center">
|
||||
<ZoomButtons t={t} />
|
||||
<Spacer />
|
||||
<div className="flex flex-row items-center gap-4">
|
||||
|
@ -123,6 +123,15 @@ export const ViewHeader = ({ update, settings, ui, control }) => {
|
|||
onClick={() => update.ui(['renderer'], ui.renderer === 'react' ? 'svg' : 'react')}
|
||||
/>
|
||||
</div>
|
||||
<Spacer />
|
||||
<div className="flex flex-row items-center gap-4">
|
||||
<button
|
||||
onClick={setSettings}
|
||||
className={`btn btn-sm btn-outline btn-secondary hover:text-secondary-focus`}
|
||||
>
|
||||
<ClearIcon /> {t('clearSettings')}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue