-
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.
- Loading branch information
0 parents
commit e8e57ff
Showing
7 changed files
with
14,605 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.docz | ||
node_modules |
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,41 @@ | ||
# Raspihive Docs using Docz | ||
|
||
## Using `create-docz-app` | ||
|
||
```sh | ||
npx create-docz-app docz-app-basic | ||
# or | ||
yarn create docz-app docz-app-basic | ||
``` | ||
|
||
## Download manually | ||
|
||
```sh | ||
curl https://codeload.github.com/doczjs/docz/tar.gz/master | tar -xz --strip=2 docz-master/examples/basic | ||
mv basic docz-basic-example | ||
cd docz-basic-example | ||
``` | ||
|
||
## Setup | ||
|
||
```sh | ||
yarn # npm i | ||
``` | ||
|
||
## Run | ||
|
||
```sh | ||
yarn dev # npm run dev | ||
``` | ||
|
||
## Build | ||
|
||
```sh | ||
yarn build # npm run build | ||
``` | ||
|
||
## Serve built app | ||
|
||
```sh | ||
yarn serve # npm run serve | ||
``` |
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,16 @@ | ||
{ | ||
"name": "Raspihive-Docs", | ||
"version": "2.0.0", | ||
"license": "MIT", | ||
"scripts": { | ||
"dev": "docz dev", | ||
"build": "docz build", | ||
"serve": "docz serve" | ||
}, | ||
"dependencies": { | ||
"docz": "latest", | ||
"prop-types": "^15.7.2", | ||
"react": "^16.11.0", | ||
"react-dom": "^16.11.0" | ||
} | ||
} |
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,35 @@ | ||
import React from 'react' | ||
import t from 'prop-types' | ||
|
||
const kinds = { | ||
info: '#5352ED', | ||
positive: '#2ED573', | ||
negative: '#FF4757', | ||
warning: '#FFA502', | ||
} | ||
|
||
export const Alert = ({ children, kind, ...rest }) => ( | ||
<div | ||
style={{ | ||
padding: 20, | ||
background: 'white', | ||
borderRadius: 3, | ||
color: 'white', | ||
background: kinds[kind], | ||
}} | ||
{...rest} | ||
> | ||
{children} | ||
</div> | ||
) | ||
|
||
Alert.propTypes = { | ||
/** | ||
* The kind prop is used to set the alert's background color | ||
*/ | ||
kind: t.oneOf(['info', 'positive', 'negative', 'warning']), | ||
} | ||
|
||
Alert.defaultProps = { | ||
kind: 'info', | ||
} |
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,28 @@ | ||
--- | ||
name: Alert | ||
menu: Components | ||
--- | ||
|
||
import { Playground, Props } from 'docz' | ||
import { Alert } from './Alert' | ||
|
||
# Alert | ||
|
||
## Properties | ||
|
||
<Props of={Alert} /> | ||
|
||
## Basic usage | ||
|
||
<Playground> | ||
<Alert>Some message</Alert> | ||
</Playground> | ||
|
||
## Using different kinds | ||
|
||
<Playground> | ||
<Alert kind="info">Some message</Alert> | ||
<Alert kind="positive">Some message</Alert> | ||
<Alert kind="negative">Some message</Alert> | ||
<Alert kind="warning">Some message</Alert> | ||
</Playground> |
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,20 @@ | ||
--- | ||
name: Getting Started | ||
route: / | ||
--- | ||
|
||
# Getting Started | ||
|
||
Design systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications. | ||
|
||
Regardless of the technologies and tools behind them, a successful design system follows these guiding principles: | ||
|
||
- **It’s consistent**. The way components are built and managed follows a predictable pattern. | ||
- **It’s self-contained**. Your design system is treated as a standalone dependency. | ||
- **It’s reusable**. You’ve built components so they can be reused in many contexts. | ||
- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web. | ||
- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs. | ||
|
||
## Consistency | ||
|
||
Your first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system. |
Oops, something went wrong.