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
Do not use h* in Card*#defaultProps#tag? #1297
Comments
Leaning towards option 1. |
I agree. Option 1 sounds the best to me. |
as workaround for import { CardTitle } from 'reactstrap'
CardTitle.defaultProps.tag = 'div' @TheSharpieOne close this? |
The
Card*defaultProp#tag
has been in place from the start since #44 (updated in #794) but I don't thinkreactstrap
should conflate these any more.<h1>
-<h6>
) are for document structurecard-*
classes (card-title
,.card-subtitle
, ...) are for applying presentational style (ref BS4 docs) and do not suppose heading levelsRationale:
Resolution? Maybe of the following:
Do not suppose structure. Use a generic container (
div
) by default instead of a heading elementProvide an API to map defaultTags to components á la
utils#[setGlobal/mapTo]CssModule
or context or somethingI can easily imagine projects where
Cards
are highly correlated to document structure, in which caseCardTitle
/CardSubtitle
defaultTags ofh<N>
would be really helpful. But even then, I'd want to be able to set theh*
levels b/c its probably noth5
/h6
. @TheSharpieOne if you have an opinion here I'm happy to start working on a PRThe text was updated successfully, but these errors were encountered: