You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This is an simple example of creating a custom panel.
# This one is an assets panel that is used to display the
# contents of any CSS/JS assets for a component.
#
# It assumes that asset files are named the same as the component
# file but with a `.css/.js` file extesions.
Lookbook.add_panel("assets", "lookbook/panels/assets", {
label: "Assets",
locals: lambda do |data|
assets = data.preview.render_targets.flat_map do |target|
asset_files = Dir["#{target.directory_path}/#{target.file_name(true)}.{css,js}"]
asset_files.map { |path| Pathname.new path }
end.compact
{assets: assets}
end
})
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: