-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- move hero to docs helpers - add tests - adjust language in Button docs
- Loading branch information
Showing
7 changed files
with
62 additions
and
68 deletions.
There are no files selected for viewing
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,27 +1,32 @@ | ||
### Minimal Usage | ||
|
||
``` | ||
<Link.Button>Find out how</Link.Button> | ||
``` | ||
A Button Link is a navigational element that styles itself as a button. Clicking one should navigate to a new "page". | ||
|
||
### Variants | ||
By default, Buttons will be displayed in the `primary` variant. Use primary buttons for the main call to action on a page. | ||
|
||
``` | ||
const PurpleBlock = require('../../__docs__/PurpleBlock').default; | ||
<div> | ||
<Link.Button variant="primary">Explore</Link.Button> | ||
<Link.Button variant="secondary">Take me there</Link.Button> | ||
<br/> | ||
<br/> | ||
<PurpleBlock> | ||
<Link.Button variant="outlined">Find me</Link.Button> | ||
</PurpleBlock> | ||
</div> | ||
<Link.Button href="http://www.telus.com">Find out how</Link.Button> | ||
``` | ||
|
||
### Inverted Button Links | ||
### Using Button Links | ||
|
||
All Button Links have the same visual appearance as [Button](#button), but are applied differently in certain contexts. Unlike the Button component, Button Link is more appropriate for: | ||
|
||
- Call to action | ||
- Placement atop a complex background such as an image | ||
|
||
#### Placing Button Links on images | ||
|
||
Use the `outlined` variant when placing a button on top of an image, which will cause the image to show through. You can | ||
also `invert` the colour scheme. | ||
|
||
Use this variant with caution. There will be accessibility issues if the colour contrast of the image and the button text | ||
is too low, including the hover state. | ||
|
||
``` | ||
<Link.Button invert>Learn more</Link.Button> | ||
const Hero = require('../../__docs__/Hero').default; | ||
<Hero> | ||
<Button variant="outlined" invert>Advanced solutions</Button> | ||
</Hero> | ||
``` |
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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...ponents/Button/__docs__/Hero.modules.scss → src/components/__docs__/Hero.modules.scss
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,4 +1,4 @@ | ||
@import '../../../scss/settings/spacing'; | ||
@import '../../scss/settings/spacing'; | ||
|
||
.hero { | ||
display: flex; | ||
|
File renamed without changes