adopted-ember-addons / ember-cli-flash

Simple, highly configurable flash messages for ember-cli
https://www.npmjs.com/package/ember-cli-flash
MIT License
355 stars 113 forks source link

Allow flash-message to not have any default class as prefix #187

Closed cibernox closed 5 years ago

cibernox commented 8 years ago

With this change, if the component receives a messageStyle="one-of-my-own" it doesn't generate it just generates an "alert-{{TYPE}}" (instead of "alert alert-{{type}}"), since that is the styles expected by bootstrap.

The default behavior is still the same, this just allows the user to opt out.

This allows me by example to create my own component that extends from the default one and provide different classes (since in my project the "alert" class is used for another kind of component, and I want to use "flash" instead.

import FlashMessageComponent from 'ember-cli-flash/components/flash-message';

export default FlashMessageComponent.extend({
  classNames: ['flash'],
  messageStyle: 'custom'
});
homu commented 7 years ago

:umbrella: The latest upstream changes (presumably f5002eb) made this pull request unmergeable. Please resolve the merge conflicts.

sbatson5 commented 5 years ago

@cibernox You good if I close this? 😅

cibernox commented 5 years ago

@sbatson5 be my guest 👍