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

[DIS2-1072] Update linkPlain documentation. #231

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions docs/components/ButtonView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,21 @@ export default function ButtonView() {
<Button disabled type="link" href="http://clever.com" value="Disabled Link" />
<Button type="linkPlain" href="http://google.com" value="Plain Link" />
</ExampleCode>
<br />
<p>
Here is a <Button type="linkPlain" href="//google.com" value="plain link" /> with no
Here is a <Button type="linkPlain" href="//google.com" value="plain link" />. By default it has no
margin/padding.
<br />
Better suited for inline links than the
</p>
<p>
<span className={cssClass.LARGE_FONT_LINK_PLAIN_CONTAINER}>
Another attribute of <Button type="linkPlain" href="//google.com" value="plain links" /> is that they match
the font size of the DOM element they are contained in.
</span>
</p>
<p>
Copy link
Contributor

Choose a reason for hiding this comment

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

opt: could assign the LARGE_FONT_... class here too so it's more obvious that the link button doesn't match the font size around it

This makes plain links ideal for inline links, unlike the
regular <Button type="link" href="http://google.com" value="link button" />, which doesn't
automatically match the text around it.
automatically match the text around it and has padding.
</p>
</Example>

Expand Down Expand Up @@ -191,4 +199,5 @@ export default function ButtonView() {

ButtonView.cssClass = {
CONTAINER: "ButtonView",
LARGE_FONT_LINK_PLAIN_CONTAINER: "ButtonView--largeFontLinkPlainContainer",
};
4 changes: 4 additions & 0 deletions docs/components/ButtonView.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@
.margin--right--m;
}
}

.ButtonView--largeFontLinkPlainContainer {
.text--large;
}
}