Skip to content

Commit

Permalink
fix: add options to storyblok icon field plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
julrich committed Oct 31, 2024
1 parent e7d4434 commit c458122
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@kickstartds/jsonschema2storyblok",
"comment": "add options to icon custom field plugin",
"type": "patch"
}
],
"packageName": "@kickstartds/jsonschema2storyblok"
}
2 changes: 1 addition & 1 deletion tools/jsonschema2storyblok/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ function processBasic({
if (subSchema.type === 'string' && subSchema.format && subSchema.format === 'icon') {
field.type = 'custom';
field.field_type = 'storyblok-icon-sprite-picker-field-plugin';
field.options = [];
field.options = [{ name: 'allowedIcons', value: JSON.stringify(subSchema.enum), _uid: uuidv4() }];
}

if (subSchema.type === 'string' && subSchema.format && subSchema.format === 'image') {
Expand Down

0 comments on commit c458122

Please sign in to comment.