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

@heroku/ember-malibu-icon

Package Overview
Dependencies
Maintainers
286
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@heroku/ember-malibu-icon

Ember Malibu Icons

  • 1.4.0-beta.3
  • beta
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
286
Weekly downloads
 
Created
Source

Ember Malibu Icon

This Ember addon injects the Malibu svg sprite into your Ember application and provides a helper to insert icons into your templates. You can explore how this helper works in this addon's demo app and documentation.

Note that it will be helpful if you also use Purple 3 for styling

Installation

ember install --save @heroku/ember-malibu-icon

Configuration

By default this addon will inject the latest version of Malibu. Consumers can configure this in their application's config/environment.js file

ENV['ember-malibu-icon'] = {
  malibuVersion: '1.3.0'
}

Usage

From a Handlebars (.hbs) file

Accessibility

Accessibility When rendering MalibuIcon, you must declare the icon as either:

  • informational: Pass a non-empty string to @title argument. This will read the text to the screenreader instead of being announced as "Image".
  • presentational: Pass role="presentation" to the component. This will hide the icon from assistive technology. This should only be used for icons that don't convey additional meaning and are being used for aesthetic/design reasons.
Informational Usage Example

Use this when when you want text to be announced to the screenreader. This is most common when you have icons that are used for buttons or links but lack text rendered next to the icon to describe it.

<MalibuIcon @title="Add Buildpack {{buildpackName}}" @size="28" @iconClass="gradient-dark-gray" @name="app-28" />

For example:

Image showing a list of domains. Each row has a pencil icon which is rendered by Malibu. There is no matching text which is an example of a use case for passing the @title argument.

Given this screenshot, note the pencil icon. There is no text next to it to describe its intended purpose to the screenreader (in this case, "Edit"). @title="Edit {{domain}}" would be an improvement in this scenario.

Presentational Usage

Use this when the icon does not convey additional meaning. There should be visual text accompanying the icon. Never use this when only the icon is rendered.

For example:

Image showing the text "GitHub" next to an SVG icon of the GitHub logo.

In this example, the GitHub logo is "presentational" because it does not convey additional meaning not already presented to the user via the "GitHub" text next to it.

<MalibuIcon @size="28" @iconClass="gradient-dark-gray" @name="app-28" role="presentation" />

From a javascript file (not recommended/deprecated)

import { malibuIcon } from '@heroku/ember-malibu-icon/helpers/malibu-icon';
malibuIcon({
  name: 'app-16',
  size: 16,
  iconClass: 'v-mid gradient-purple',
  title='Optional Title'
})

Development

  • git clone https://github.com/heroku/ember-malibu-icon
  • cd ember-malibu-icon
  • yarn

Running

Running Tests

  • yarn test (Runs ember try:each to test your addon against multiple Ember versions)
  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit https://ember-cli.com/.

Releases

Notes

This library does its best to follow the principles of Semantic Versioning. Every effort should be made to ensure all non-major versions are released in a backwards compatible way.

Making a New Release

Once you are ready to make a new release follow these steps:

  • Create a new branch
  • Update the version number in package.json
  • Commit your changes and open a PR

Publish your new version to npm with the command npm publish 🎉

Note that you must have publish access to the @heroku npm organization to successfully publish

Keywords

FAQs

Package last updated on 14 Jul 2020

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