-
Notifications
You must be signed in to change notification settings - Fork 20
Insert addClass prop to all vue-strap components #84
Conversation
Use a shorter name (or give a shorter alias) e.g., |
src/Tab.vue
Outdated
@@ -21,6 +21,10 @@ export default { | |||
disabled: { | |||
type: Boolean, | |||
default: false | |||
}, | |||
customClass: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<tab header="First tab" custom-class="meow woof doot">
...
</tab>
<tab header="Disabled second tab :x:" disabled custom-class="meow woof doot">
</tab>
Tabs and TabGroups doesn't seem to have the correct classes, they did not appear in the html when I checked it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After refactoring the classes to be inserted within Tabset.vue
, it will appear. However, do we really need to put the blanket class on all child sub-components?
If so, we would need to modify Panel
and Question
among others as well.
I feel just applying it to the outer most wrapper is sufficient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, do we really need to put the blanket class on all child sub-components?
Not needed actually, don't really see a use case for it.
9edc89b
to
a9fb731
Compare
Update
|
|
I guess we can't use |
53a34cc
to
8a17024
Compare
Update
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor nit:
src/Navbar.vue
Outdated
@@ -1,5 +1,6 @@ | |||
<template> | |||
<nav ref="navbar" :class="['navbar', 'navbar-expand-md', { | |||
<nav ref="navbar" :class="['navbar', 'navbar-expand-md', addClass, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addClass
should be at the back of the array.
8a17024
to
f0e94c2
Compare
Update
|
Does |
I did not try, but I think it could work. However there are 2 small issues with it:
Renaming it to |
What is the purpose of this pull request? (put "X" next to an item, remove the rest)
• [x] New feature
Part of MarkBind/markbind#363
What is the rationale for this request?
Add requested feature
What changes did you make? (Give an overview)
customClass
prop to all components.Tabs
component is split into 3 distinct sub-components,customClass
added to all 3.Tabs
custom class is only added to the root / parent component as we discussed there is no need for the child sub components to have it.Testing instructions:
npm run build
and copyvue-strap.min.js
to your markbind asset folderindex.md
, custom classes should be added to the outer most wrapper of each component.