Socket
Book a DemoInstallSign in
Socket

@nimblehq/cx-theme

Package Overview
Dependencies
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nimblehq/cx-theme

The stylesheet and JS files for all UI components of CX.

latest
Source
npmnpm
Version
0.3.0
Version published
Maintainers
3
Created
Source

Nimble CX Theme

The stylesheet and JS files for all UI components of CX.

Usage

Package Installation

Several options are available to install the package:

  • Install with NPM
    $ npm install @nimblehq/cx-theme
    
  • Install with Yarn
    $ yarn add @nimblehq/cx-theme
    
  • Use Git URL to add the dependency. This repository is private a Github username & token is required to access.
    // package.json
    ...
    "dependencies": {
      ...
      "@nimblehq/cx-theme": "git+https://<github-username>:<github-token>@github.com/nimblehq/cx-theme.git#develop"
    }, 
    ...
    
  • Use the Local path
    // package.json
    ...
    "dependencies": {
      ...
      "@nimblehq/cx-theme": "file:../cx-theme"
    }, 
    ...
    

Via SCSS imports

Then import it in your application.scss, e.g,

/* app/assets/stylesheets/application.scss */
@import '@nimblehq/cx-theme/scss/cx-theme';

By making it more flexible you can import the _variables.scss and /components. This method allows you to override theme variables.

// Theme Variables
@import '@nimblehq/cx-theme/scss/cx_theme/variables';

// Bootstrap
@import 'bootstrap/scss/bootstrap';

// Theme Overrided Components
@import '@nimblehq/cx-theme/scss/cx_theme/components';

Make sure to import Bootstrap's bootstrap.scss in between _variables.scss and /components!

Icon Sprite

This package also provides a solution for rendering some icons with SVG sproites. So we can just use inline SVG like this within out layout.

<!-- This example is Rails helper methods. -->
<div hiddden>
  <%= inline_svg_tag 'cx-theme/dist/images/icon-sprite.svg' %>
</div>

Development Usage

Prerequisite

Use specific node version with NVM

$ nvm use

Install packages

$ npm install

Build assets

$ npm run asset:build

Compile HTML

$ npm run pug:build

View styleguide

$ npm run serve

Visiting http://localhost:8080/build with a web browser will display the styleguide. ✨

Styleguide Web Application

License

This project is Copyright (c) 2014 and onwards Nimble. It is free software, and may be redistributed under the terms specified in the LICENSE file.

About

Nimble

This project is maintained and funded by Nimble.

We love open source and do our part in sharing our work with the community! See our other projects or hire our team to help build your product.

Keywords

bootstrap

FAQs

Package last updated on 10 Jun 2021

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