Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass in style attribute to style attachment #136

Merged
merged 1 commit into from May 17, 2018

Conversation

@jrjohnson
Copy link
Contributor

jrjohnson commented May 17, 2018

Allows passing in a safe string as a style which will be applied to the
tooltip or attachment element.

Fixes #135

@jrjohnson jrjohnson mentioned this pull request May 17, 2018
Copy link
Owner

kybishop left a comment

Thanks @jrjohnson! This is looking great, just a few minor comments.

@@ -39,6 +40,7 @@ export default Component.extend({
}
}),
class: DEFAULTS.class,
style: DEFAULTS.style,

This comment has been minimized.

Copy link
@kybishop

kybishop May 17, 2018

Owner

Bikeshed: Let's keep these alphabetized by moving this to the bottom of this property list.

This comment has been minimized.

Copy link
@jrjohnson

jrjohnson May 17, 2018

Author Contributor

No problem, done.

_style: computed('style', '_transitionDuration', function () {
const style = this.get('style');
const transitionDuration = this.get('_transitionDuration');
assert(

This comment has been minimized.

Copy link
@kybishop

kybishop May 17, 2018

Owner

Doesn't ember normally warn when we pass a style that wasn't marked with htmlSafe? If so, I think we should follow suit over asserting.

This comment has been minimized.

Copy link
@jrjohnson

jrjohnson May 17, 2018

Author Contributor

Good call. I thought it was an error, but it is, in fact, just a warning. Fixed

@@ -2,6 +2,7 @@ export default {
animation: 'fill',
arrow: false,
class: null,
style: null,

This comment has been minimized.

Copy link
@kybishop

kybishop May 17, 2018

Owner

Let's alphabetize this, too.

@jrjohnson jrjohnson force-pushed the jrjohnson:135-dynamic-styles branch from d222779 to e403ca9 May 17, 2018
Allows passing in a safe string as a style which will be applied to the
tooltip or attachment element.
@jrjohnson jrjohnson force-pushed the jrjohnson:135-dynamic-styles branch from e403ca9 to f78f427 May 17, 2018
@kybishop kybishop merged commit c6cc99f into kybishop:master May 17, 2018
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jrjohnson jrjohnson deleted the jrjohnson:135-dynamic-styles branch May 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.