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

feat: allow custom styling - fixes #93 #116

Merged
merged 10 commits into from
Aug 3, 2017
Merged

feat: allow custom styling - fixes #93 #116

merged 10 commits into from
Aug 3, 2017

Conversation

hardikpthv
Copy link
Contributor

feat(css): Added ability to set custom css class and accept custom styles. (#93)

@UncleDave UncleDave self-requested a review July 24, 2017 18:09
@UncleDave UncleDave added this to the v1.0.0 milestone Jul 24, 2017
@UncleDave
Copy link
Collaborator

FYI I haven't forgotten about this, I just haven't had the time to review it yet.

@UncleDave UncleDave requested a review from aberezkin July 25, 2017 16:48
@@ -83,6 +135,7 @@ In the final state it should look something like this:
[buttonCaption]="'Select Images!'"
[dropBoxMessage]="'Drop your images here!'"
[extensions]="['jpg','png','gif']"
[class]="'customClass'"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about style directive?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can add [style] directive but it will mislead user. Good to apply either [class] or [style] because [style] overrides [class]. Do you still want me to add? @aberezkin

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No since we have it in the demo, it's ok.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah 👍

Copy link
Collaborator

@UncleDave UncleDave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a relevant demo?

@@ -26,6 +26,7 @@ export class ImageUploadComponent implements OnInit {

@Input() beforeUpload: (UploadMetadata) => UploadMetadata | Promise<UploadMetadata> = data => data;
@Input() buttonCaption: string = 'Select Images';
@Input('class') klass: string = 'img-ul';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I don't like the name klass, it doesn't really tell me what the variable is - perhaps cssClass or customClass fit better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay @UncleDave i will change it to cssClass. Sure i will add demo for the same.

*
* ```
* layout: {
* "border": " #d0d0d0 dashed 1px",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sneaky little space here " #d0d0d0 dashed 1px"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted 👍

README.md Outdated

**Note:**
- `.img-ul-*` is class overridden with new styles.
- Also set `encapsulation: ViewEncapsulation.Native/None` in your component.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this for?

Copy link
Contributor Author

@hardikpthv hardikpthv Aug 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was for avoiding scope to override. Needn't be required any more because "deep" selector (>>>) performs well.

@UncleDave UncleDave changed the title Feature/custom class and styles feat: allow custom styling - fixes #93 Aug 1, 2017
@UncleDave UncleDave merged commit a1aa8f4 into aberezkin:development Aug 3, 2017
@hardikpthv hardikpthv deleted the feature/custom_class_and_styles branch August 4, 2017 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants