1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 09:43:23 +00:00
Files
browser/libs/components/src/link/link.mdx
Jonathan Prusik 66d9ab5dc0 [PM-9969] Papercut - Update component library storybook docs (#10191)
* add component import examples

* component library story html formatting/cleanup nits

* Update libs/components/src/dialog/dialog/dialog.mdx

Co-authored-by: Will Martin <contact@willmartian.com>

* Update libs/components/src/badge/badge.mdx

Co-authored-by: Will Martin <contact@willmartian.com>

* Update libs/components/src/dialog/simple-dialog/simple-dialog.mdx

Co-authored-by: Will Martin <contact@willmartian.com>

---------

Co-authored-by: Will Martin <contact@willmartian.com>
2024-08-07 11:13:29 -04:00

44 lines
1.1 KiB
Plaintext

import { Meta, Story, Primary, Controls } from "@storybook/addon-docs";
import * as stories from "./link.stories";
<Meta of={stories} />
```ts
import { LinkModule } from "@bitwarden/components";
```
# Link / Text button
Text Links and Buttons use the `primary-600` color and can use either the `<a>` or `<button>` tags.
Choose which based on the action the button takes:
- if navigating to a new page, use a `<a>`
- if taking an action on the current page use a `<button>`
Text buttons or links are most commonly used in paragraphs of text or in forms to customize actions
or show/hide additional form options.
<Primary />
<Controls />
## Sizes
There are 2 sizes for the component: default and small.
Default uses `text-base` and small uses `text-xs`
## With icons
Text Links/buttons can have icons on left or the right.
To indicate a new or add action, the <i class="bwi bwi-plus-circle"></i> icon on is used on the
left.
An angle icon, <i class="bwi bwi-angle-right"></i>, is used on the left to indicate an expand to
show/hide additional content.
## Accessibility
Make sure to only use the Link on backgrounds that maintain the WCAG color contrast ratios.