Removing labels from buttons and only using icons
See original GitHub issueI’m wondering if it’s possible to display only the icons as and not the text as specified in the original icon issue, for creating and removing object and array entries.
Currently the JSON below will generate the following buttons:
I can either get:
- The name of the category
- Blank for add, but not delete by setting category to " "
- “item” used for the category if I don’t specify anything.
There is no specific wrapper on the text so I can’t hide just that and setting the font-size: 0
will also kill the font awesome icon.
Am I missing a basic configuration option here, any ideas how to best go about doing this?
{
disable_properties: true,
disable_collapse: true,
disable_edit_json: true,
theme: "bootstrap3",
iconlib: "fontawesome4",
schema: {
type: "array",
title: "categories",
items: {
type: "object",
title: "category level 1",
properties: {
"Category 1": {
type: "string",
enum: ["Fill me"]
},
category2: {
type: "array",
// title: "category 2",
items: {
type: "object",
title: " ",
properties: {
"Category 2": {
type: "string",
enum: ["Fill me"]
},
"Category 3": {
type: "array",
title: "Category 3",
items: {
"Category 2": {
type: "string",
enum: ["Fill me"]
}
}
}
}
}
}
}
}
}
}
);
});
Issue Analytics
- State:
- Created 5 years ago
- Comments:18
Top Results From Across the Web
Introducing navigation icons with labels, then removing them
Only in the case a set of icons belong to a convention (and this discern has to be done carefully) it might be...
Read more >How To Remove App Icon Labels/Names! EASY on ANY ...
Hey guys, hope you enjoyed the quick little tutorial on how to get a cleaaaaaner step on your android device.
Read more >How do I remove titles from Windows 10 taskbar and keep ...
Right click on the taskbar and select Properties. Where it says Taskbar buttons, you want to set it to Always combine, hide labels....
Read more >How to Remove Text from Icons in the Windows Taskbar
In this article, I'll show you how to remove the text in taskbar icons so that it only shows the icons and takes...
Read more >How can I remove label from bottom navigation bar in flutter so ...
However this will remove all the labels, but i only want to remove the label of the add button. If I just use...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Made a patch with span tags and it seems to be working perfectly. 😃 But the
json-editor-btn-
class is based on the iconlib key, so it might not be specific enough to style individual buttons. Especially the Array/Table “Delete” and “Delete All” buttons, which have the same icon/class name. There’s probably more, so if you got any ideas/suggestions let me know. I’ll then add some custom class names to those buttons.Only one I can think of is that the HTML is always created for both icon and label, so the output will be a little bit larger due to the span tags.
The 3rd example will only work on Bootstrap themes, so we might want to introduce 1 or more extra “json-editor-btn-*” class names (Must be set regardless of theme). That way we can group buttons of same “type”.
The function that toggles button states like Expand/Collapse might need to be updated to be able to insert the correct text inside the span tags.