-
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.
Added Text component and modified Select and Switch components.
- Loading branch information
Showing
8 changed files
with
232 additions
and
5 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
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,83 @@ | ||
/*! | ||
========================================================= | ||
* BLK Design System PRO React - v1.0.0 | ||
========================================================= | ||
* Product Page: https://www.creative-tim.com/product/blk-design-system-pro-react | ||
* Copyright 2019 Creative Tim (https://www.creative-tim.com) | ||
* Coded by Creative Tim | ||
========================================================= | ||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
*/ | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
|
||
// Add your info to the docs if you edit this! | ||
|
||
/** | ||
* ### Baseline text component! | ||
* | ||
* @version 0.0.1 | ||
* @author Noah Templet ([w3aseL](https://github.com/w3aseL)) | ||
*/ | ||
class Text extends React.Component { | ||
constructor(props) { | ||
super(props) | ||
} | ||
|
||
static propTypes = { | ||
/** | ||
* The children. Likely text or links or other stuff. | ||
*/ | ||
children: PropTypes.node.isRequired, | ||
/** | ||
* The header class to use. [h1, h2, h3, h4, h5, h6] | ||
*/ | ||
header: PropTypes.string, | ||
/** | ||
* The display header to use. [1-4] | ||
*/ | ||
display: PropTypes.number, | ||
/** | ||
* Mutes the text. | ||
*/ | ||
muted: PropTypes.bool, | ||
/** | ||
* Adds lead styling to the text. | ||
*/ | ||
lead: PropTypes.bool, | ||
/** | ||
* Adds color to the text. | ||
*/ | ||
color: PropTypes.color, | ||
/** | ||
* Keeps the text from expanding the width of the line. | ||
*/ | ||
inline: PropTypes.bool | ||
} | ||
|
||
static defaultProps = { | ||
children: "Bruh where the text at." | ||
} | ||
|
||
render() { | ||
const { children, header, display, muted, lead, color, inline } = this.props | ||
|
||
return ( | ||
<p | ||
className={`${header ? `${header} ` : ""}${display ? `display-${display} ` : ""}${muted ? "text-muted " : ""}${lead ? "lead " : ""}${color ? `text-${color} ` : ""}${inline ? "w-auto d-inline-block " : ""}`} | ||
> | ||
{children} | ||
</p> | ||
) | ||
} | ||
} | ||
|
||
export { Text } | ||
|
||
export default Text |
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,69 @@ | ||
### Text Syntax | ||
|
||
Importing the text component. | ||
```js static | ||
import Text from 'revibe-component-library/Text' | ||
|
||
import { Text } from 'revibe-component-library' | ||
``` | ||
|
||
### Using the Component | ||
```js padded | ||
<Text /> | ||
<br /> | ||
<Text>Here's some text!</Text> | ||
``` | ||
### Headers | ||
```js padded | ||
<Text header="h1">h1 Header</Text> | ||
<br/> | ||
<Text header="h2">h2 Header</Text> | ||
<br/> | ||
<Text header="h3">h3 Header</Text> | ||
<br/> | ||
<Text header="h4">h4 Header</Text> | ||
<br/> | ||
<Text header="h5">h5 Header</Text> | ||
<br/> | ||
<Text header="h6">h6 Header</Text> | ||
``` | ||
### Display Headers | ||
```js padded | ||
<Text header="h1" display={1}>Display 1</Text> | ||
<br/> | ||
<Text header="h1" display={2}>Display 2</Text> | ||
<br/> | ||
<Text header="h1" display={3}>Display 3</Text> | ||
<br/> | ||
<Text header="h1" display={4}>Display 4</Text> | ||
``` | ||
### Mute and Lead | ||
```js padded | ||
<Text>Here's some regular text!</Text> | ||
<br /> | ||
<Text muted>Here's some muted text!</Text> | ||
<br /> | ||
<Text lead>Here's text that uses lead!</Text> | ||
<br /> | ||
<Text muted lead>Here's text that is muted and uses lead!</Text> | ||
``` | ||
### Inline | ||
```js padded | ||
<Text inline>Inline Text 1</Text> | ||
<Text inline>Inline Text 2</Text> | ||
``` | ||
### Colors | ||
```js padded | ||
<Text inline header="h4" color="primary">Primary</Text> | ||
<Text inline header="h4" color="secondary">Secondary</Text> | ||
<Text inline header="h4" color="info">Info</Text> | ||
<Text inline header="h4" color="neutral">Neutral</Text> | ||
<Text inline header="h4" color="success">Success</Text> | ||
<Text inline header="h4" color="warning">Warning</Text> | ||
<Text inline header="h4" color="danger">Danger</Text> | ||
``` |
Empty file.
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,3 @@ | ||
{ | ||
"main": "Text.jsx" | ||
} |
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