mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-27 10:32:58 +02:00
11 lines
360 B
TypeScript
11 lines
360 B
TypeScript
|
import Setting from '@joplin/lib/models/Setting';
|
||
|
import { HeaderId } from '../../types';
|
||
|
|
||
|
const toggleHeader = (headerId: HeaderId) => {
|
||
|
const settingKey = headerId === HeaderId.TagHeader ? 'tagHeaderIsExpanded' : 'folderHeaderIsExpanded';
|
||
|
const current = Setting.value(settingKey);
|
||
|
Setting.setValue(settingKey, !current);
|
||
|
};
|
||
|
|
||
|
export default toggleHeader;
|