generated from eea/volto-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from eea/develop
Release
- Loading branch information
Showing
8 changed files
with
384 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
src/customizations/volto/components/manage/Blocks/ToC/Schema.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
const TableOfContentsSchema = ({ data }) => { | ||
const { variation = 'default' } = data; | ||
|
||
return { | ||
title: 'Table of Contents', | ||
fieldsets: [ | ||
{ | ||
id: 'default', | ||
title: 'Default', | ||
fields: [ | ||
'title', | ||
'hide_title', | ||
...(variation === 'default' ? ['ordered'] : ['sticky']), | ||
'levels', | ||
], | ||
}, | ||
], | ||
properties: { | ||
title: { | ||
title: 'Block title', | ||
}, | ||
hide_title: { | ||
title: 'Hide title', | ||
type: 'boolean', | ||
}, | ||
levels: { | ||
title: 'Entries', | ||
isMulti: true, | ||
choices: [ | ||
['h1', 'h1'], | ||
['h2', 'h2'], | ||
['h3', 'h3'], | ||
['h4', 'h4'], | ||
['h5', 'h5'], | ||
['h6', 'h6'], | ||
], | ||
}, | ||
ordered: { | ||
title: 'Ordered', | ||
type: 'boolean', | ||
}, | ||
sticky: { | ||
title: 'Sticky', | ||
type: 'boolean', | ||
}, | ||
}, | ||
required: [], | ||
}; | ||
}; | ||
|
||
export default TableOfContentsSchema; |
Oops, something went wrong.