-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
100 additions
and
8 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Badge | ||
|
||
## Import | ||
|
||
```javascript | ||
import { Badge } from "/imports/plugins/core/ui/client/components"; | ||
``` | ||
|
||
## Usage Example | ||
|
||
```javascript | ||
import React, { Component } from "react"; | ||
import { Badge } from "/imports/plugins/core/ui/client/components"; | ||
|
||
class MyReactComponent extends Component | ||
return ( | ||
<Badge | ||
badgeSize="large" | ||
className="single class, or array of classes" | ||
i18nKeyLabel="some.key" | ||
label="My Button" | ||
status="success" | ||
/> | ||
) | ||
}; | ||
|
||
export default MyReactComponent; | ||
``` | ||
|
||
## Props | ||
|
||
Property | Type | Description | ||
-------------------- | ------------------------- | --------------------------- | ||
badgeSize | String | Badge size. Defaults to small. `small | large` | ||
className | String, Object | "class-name", or { "class-name": true } | ||
i18nKeyLabel | String | i18n key for badge label (shows in badge) | ||
label | String | Button label | ||
status | String | Sets badge state with a string. `primary | success | info | warning | danger | link | cta | default` |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# ClickToCopy | ||
|
||
## Import | ||
|
||
```javascript | ||
import { ClickToCopy } from "/imports/plugins/core/ui/client/components"; | ||
``` | ||
|
||
## Usage Example | ||
|
||
```javascript | ||
import React, { Component } from "react"; | ||
import { ClickToCopy } from "/imports/plugins/core/ui/client/components"; | ||
|
||
class MyReactComponent extends Component | ||
return ( | ||
<ClickToCopy | ||
copyToClipboard="string to copy to clipboard" | ||
displayText="text to display to user" | ||
i18nKeyTooltip="some.key" | ||
tooltip="placeholder tooltip text" | ||
tooltipPosition="bottom center" | ||
/> | ||
) | ||
}; | ||
|
||
export default MyReactComponent; | ||
``` | ||
|
||
## Props | ||
|
||
Property | Type | Description | ||
-------------------- | ------------------------- | --------------------------- | ||
copyToClipboard | String | String to copy to clipboard on click (i.e. URL for Order) | ||
displayText | String | Text displayed to user (e.g. Order ID #) | ||
i18nKeyTooltip | String | i18n key for tooltip | ||
tooltip | String, Object, Component | Tooltip | ||
tooltipPosition | String | Tooltip position. Default `bottom center` |
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