Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rabbet

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rabbet

  • 0.0.3
  • Rubygems
  • Socket score

Version published
Maintainers
2
Created
Source

NOTICE: This app is in its experimental phase and a stable version has not yet been released

Rabbet 🐰

rabbet-definition

At Power, we have a suite of applications that provide a wealth of functionality to our users, many of which were broken out from our monolith. We want all of these applications to have the same look and feel and cohesive experience. While we rely on playbook for specific components, we want to put some of these components and other pieces together to give us a framework for the general layout and functionality for a top menu, sidebar, and other components that are likely to be consistently framing every page of the monolith. We also want to provide some injectable containers so that applications can magically add their own functionality into this frame if they would like to do so.

Rabbet is a convenient place to store these shared pieces and configure them based on the needs of the individual application.

Installation 🥕

  1. Add the gem to your gemfile and bundle.

gem "rabbet"

  1. Require the gem
# lib/my_cool_app.rb or application.rb

require "rabbet"
  1. Add the styles to your application.
# application.scss

@import "rabbet";
  1. Include the view helpers to help with injection
# application_helper.rb

include Rabbet::Views::Helpers

Usage 🐇

You can find a list of available pieces in app/views/rabbet. If, for example, you'd like to add the topbar to your application, you can view the injectible pieces in that specific file. In topbar, pieces that are injectible include:

  • logo
  • header
  • navigation_right

annotated-topbar-example-one

annotated-topbar-example-two

In our example we'll add the topbar, but we only want to inject the logo into our app. We would do so like so:

<% content_for :logo do %>
  <%= image_tag("path_to/logo_image/here.png") %>
<% end %>

<%= render partial: "rabbet/topbar" %>

By default, the color for the topbar will be the blue that Power's monolith uses. This is configurable, however, by passing in your chosen color as a local variable:

<%= render partial: "rabbet/topbar",
    locals: { bg_color: "#282634"} %>

FAQs

Package last updated on 12 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc