sdc_styleguide
The goal of this module is to provide a quick interface to test single directory components without having to actually create content on the site.
In an ideal world, front end developers can build the markup, styles and behaviors for the components and showcase without fully integrating them into Drupal, similar to Patternlab or Storybook.
Features
* Automatically loads all SDC available on your site.
* Dinamically creates an explorer page where you can access all the available components on site. If a demo file is defined for them, the demo will be listed as an option.
* Each component automatically gets a form that can be used to generate a test on the fly. It will generate fields for the properties and slots defined on each component.
* Demos can be created trough Drush using command drush generate sdcs-demo
* Demos can be embedded on your templates or through a render array. You can reuse demos in other demos to build more examples (See the card grid component on the sdc_styleguide_demo_components submodule).
Post-Installation
* Go to /styleguide/explorer and use the explorer to test the demos for the components.
Additional Requirements
* Drupal 10.1 and Single Directory Components for 1.0.x. Drupal 10.3 and higher for 1.1.x
* If using the generator Drush commands for demos, you will need at least Drush 12.5
Known Issues
The SDC Demo form only works once:
This is because of this issue: https://www.drupal.org/project/drupal/issues/3463875
Adding the patch should fix it if you are on an core affected version.
Supporting this Module
All contributions are appreciated https://www.buymeacoffee.com/alemadlei