-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from APMG/heading-levels-classes
Convert Heading component to separate level from className
- Loading branch information
Showing
9 changed files
with
2,110 additions
and
451 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
# Heading | ||
|
||
Creates a generic `<h#>` DOM object. | ||
Creates a generic `<h#>` DOM object. By default the classes match the level, but ideally they should be passed in by using `className`. This is so that the semantic meaning of the heading can be separated from its appearance. E.g., sometimes we might want a heading to be very small stylistically (like an `h6`-equivalent size), but due to its location nested under an `<h2>` it must be an `<h3>`. | ||
|
||
## Properties | ||
|
||
### children | ||
|
||
Whatever you stick between the `<Heading>` tags. | ||
|
||
### className | ||
|
||
Accepts a string and replaces the default className of `Heading`. This should be used most of the time for applying the correct numbered `hdg hdg-*` classes. | ||
|
||
### elementClass | ||
|
||
Accepts a string and adds that string to the className of `Heading`. | ||
Accepts a string and appends it to the end of the default/existing `className` of the heading. | ||
|
||
### level* | ||
### level\* | ||
|
||
Accepts a number from 1 to 6 and renders your header from `<h1>` to `<h6>` accordingly. | ||
Accepts a number from 1 to 6 and renders your header from `<h1>` to `<h6>` accordingly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters