netlify-cms-widgets icon indicating copy to clipboard operation
netlify-cms-widgets copied to clipboard

A widget for all options and a widget for custom options

Open galvarez421 opened this issue 7 years ago • 1 comments
trafficstars

It seems that currently there are 3 widgets, one for all brand icons, one for all regular icons, and one for all solid icons.

I think it would be useful to allow for a single widget to include all of the icons.

I also think it would be useful to allow for a completely custom set of options in case it makes sense to present only a limited set of options that would make sense for a particular piece of content.

I imagine this change could be made without changing the API for the existing widgets, for example:

CMS.registerWidget(
  "fontawesome-solid",
  FontawesomeWidget.Solid,
  FontawesomeWidget.Preview
);

CMS.registerWidget(
  "fontawesome-all",
  FontawesomeWidget.All,
  FontawesomeWidget.Preview
);

CMS.registerWidget(
  "fontawesome-directions",
  FontawesomeWidget.Custom([
    'far fa-caret-square-left',
    'fas fa-caret-square-left'
  ]),
  FontawesomeWidget.Preview
);

galvarez421 avatar Aug 01 '18 02:08 galvarez421

It seems that currently there are 3 widgets

yes, we open for other widget request, if you need another widget one.

~~for the all in one icons, I think it better to create separate bundle as those will be big bundle.~~ haha i was in hurry

about the custom set, I love it.

ekoeryanto avatar Aug 01 '18 04:08 ekoeryanto