From 1c5407c0e131e927e861775ce83e0526e780f0da Mon Sep 17 00:00:00 2001 From: Jon Rohan Date: Thu, 6 Sep 2018 13:52:11 -0700 Subject: [PATCH 01/51] Getting started on docs --- pages/components/docs/Avatar.md | 20 ++++++++- pages/components/docs/BorderBox.md | 20 ++++++--- pages/components/docs/Box.js | 66 ---------------------------- pages/components/docs/Box.md | 19 ++++++++ pages/components/docs/BranchName.md | 23 +++++----- pages/components/docs/Button.md | 19 ++++++++ pages/components/docs/Buttons.md | 34 -------------- pages/components/docs/CircleBadge.md | 28 ++++++------ pages/components/docs/index.js | 4 +- 9 files changed, 95 insertions(+), 138 deletions(-) delete mode 100644 pages/components/docs/Box.js create mode 100644 pages/components/docs/Box.md create mode 100644 pages/components/docs/Button.md delete mode 100644 pages/components/docs/Buttons.md diff --git a/pages/components/docs/Avatar.md b/pages/components/docs/Avatar.md index 9e955821592..7fd1d6d2942 100644 --- a/pages/components/docs/Avatar.md +++ b/pages/components/docs/Avatar.md @@ -1,10 +1,26 @@ # Avatar ---- + +Avatars are images that users can set as their profile picture. On GitHub, they're always going to be rounded squares. They can be custom photos, uploaded by users, or generated as Identicons as a placeholder. + +## Default example + ```.jsx - + ``` +## System props + +Avatar components get `color, spacing` system props. Read our [System Props](/system-props) doc page for a full list of available props. + +## Component props + +| Prop name | Type | Description | +| :- | :- | :- | +| alt | String | Passed through to alt on img tag | +| isChild | Boolean | adds the `avatar-child` class if present | +| size | Number | default: 20, adds the `avatar-small` class if less than 24 | +| src | String | The source url of the avatar image | export const meta = { displayName: 'Avatar' diff --git a/pages/components/docs/BorderBox.md b/pages/components/docs/BorderBox.md index 1ea62000bb7..4a40d3b0172 100644 --- a/pages/components/docs/BorderBox.md +++ b/pages/components/docs/BorderBox.md @@ -1,13 +1,19 @@ # BorderBox ---- + +## Default example ```.jsx This is a BorderBox -This is a BorderBox with padding. -This is a BorderBox with shadow. -This is a BorderBox with a medium shadow. -This is a BorderBox with a large shadow. -This is a BorderBox with an extra-large shadow. -This is a BorderBox with a green border. ``` + +## System props + +BorderBox components get `COMMON` and `LAYOUT` system props. Read our [System Props](/system-props) doc page for a full list of available props. + +## Component props + +| Prop name | Type | Description | +| :- | :- | :- | +| is | String | | + export const meta = { displayName: 'BorderBox'} diff --git a/pages/components/docs/Box.js b/pages/components/docs/Box.js deleted file mode 100644 index 511f788163d..00000000000 --- a/pages/components/docs/Box.js +++ /dev/null @@ -1,66 +0,0 @@ -/* eslint-disable import/no-named-as-default-member */ -import React from 'react' -import {theme, Box, Text} from '../../../src' - -const Mono = props => - -const colors = [...Object.entries(theme.colors)].reduce((keys, [key, value]) => { - if (key !== 'bg' && key !== 'border') { - if (Array.isArray(value)) { - return keys.concat(Object.keys(value).map(i => `${key}.${i}`)) - } else { - keys.push(key) - } - } - return keys -}, []) - -const textColors = ['white', 'gray.5', 'black'] - -export default function BoxExample() { - return ( -
- - - - - - - - - - {colors.map(color => ( - - - {textColors.map(fg => ( - - ))} - - - ))} - -
- color - - - bg= - {`{color}`} - - - borderColor -
- {color} - - - {fg} - - - - {color} - -
-
- ) -} - -export const meta = {displayName: 'Box'} diff --git a/pages/components/docs/Box.md b/pages/components/docs/Box.md new file mode 100644 index 00000000000..94689bdb766 --- /dev/null +++ b/pages/components/docs/Box.md @@ -0,0 +1,19 @@ +# Box + +## Default example + +```.jsx +This is a Box +``` + +## System props + +Box components get `COMMON` and `LAYOUT` system props. Read our [System Props](/system-props) doc page for a full list of available props. + +## Component props + +| Prop name | Type | Description | +| :- | :- | :- | +| is | String | | + +export const meta = {displayName: 'Box'} diff --git a/pages/components/docs/BranchName.md b/pages/components/docs/BranchName.md index c03e5428b50..cb2285719c5 100644 --- a/pages/components/docs/BranchName.md +++ b/pages/components/docs/BranchName.md @@ -1,20 +1,19 @@ - # BranchName ---- + +## Default example ```.jsx a_new_feature_branch +``` -BranchName with Octicon - - - a_new_feature_branch - +## System props -Linked BranchName - - a_new_feature_branch - -``` +BranchName components get `COMMON` and `LAYOUT` system props. Read our [System Props](/system-props) doc page for a full list of available props. + +## Component props + +| Prop name | Type | Description | +| :- | :- | :- | +| is | String | | export const meta = {displayName: 'BranchName'} diff --git a/pages/components/docs/Button.md b/pages/components/docs/Button.md new file mode 100644 index 00000000000..ed5e1c818fb --- /dev/null +++ b/pages/components/docs/Button.md @@ -0,0 +1,19 @@ +# Button + +## Default example + +```.jsx + +``` + +## System props + +Button components get `COMMON` and `LAYOUT` system props. Read our [System Props](/system-props) doc page for a full list of available props. + +## Component props + +| Prop name | Type | Description | +| :- | :- | :- | +| is | String | | + +export const meta = {displayName: 'Button'} diff --git a/pages/components/docs/Buttons.md b/pages/components/docs/Buttons.md deleted file mode 100644 index ce4c339ba7b..00000000000 --- a/pages/components/docs/Buttons.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Buttons ---- - -```.jsx - - - - - - - - ButtonDanger - - ButtonPrimary - - ButtonOutline - - - - - This is an {''} styled as a button - - Octicon Buttons - - alert('edit')} mr={3} /> - - alert('close')} mr={3} /> - - alert('beep boop')} /> - -``` - -export const meta = {displayName: 'Buttons'} diff --git a/pages/components/docs/CircleBadge.md b/pages/components/docs/CircleBadge.md index cc1c138fc5c..8d055c9a441 100644 --- a/pages/components/docs/CircleBadge.md +++ b/pages/components/docs/CircleBadge.md @@ -1,23 +1,21 @@ +# Button -# CircleBadge ---- +## Default example ```.jsx -Small, medium & large - - - + + + +``` -With custom width & height - +## System props -{`With as a child & bg prop`} - +Button components get `COMMON` and `LAYOUT` system props. Read our [System Props](/system-props) doc page for a full list of available props. -With Octicon as child - - - -``` +## Component props + +| Prop name | Type | Description | +| :- | :- | :- | +| is | String | | export const meta = {displayName: 'CircleBadge'} diff --git a/pages/components/docs/index.js b/pages/components/docs/index.js index a3acc28d7a3..4ebd0349e05 100644 --- a/pages/components/docs/index.js +++ b/pages/components/docs/index.js @@ -1,8 +1,8 @@ export {meta as Avatar} from './Avatar.md' export {meta as BorderBox} from './BorderBox.md' -export {meta as Box} from './Box.js' +export {meta as Box} from './Box.md' export {meta as BranchName} from './BranchName.md' -export {meta as Buttons} from './Buttons.md' +export {meta as Button} from './Button.md' export {meta as CircleBadge} from './CircleBadge.md' export {meta as CircleOcticon} from './CircleOcticon.md' export {meta as CounterLabel} from './CounterLabel.md' From 7ecc07d1d1bc43738fc8051273612af45fce4ae7 Mon Sep 17 00:00:00 2001 From: Jon Rohan Date: Fri, 7 Sep 2018 14:08:27 -0700 Subject: [PATCH 02/51] width 100% on doc --- pages/_app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/_app.js b/pages/_app.js index 71ddd54c213..828bdf05146 100644 --- a/pages/_app.js +++ b/pages/_app.js @@ -34,7 +34,7 @@ export default class MyApp extends App {
- + From 2183cba2f3d8ac00b2f522d62f42e832c4fa2788 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 14:52:18 -0700 Subject: [PATCH 03/51] update BranchName docs --- pages/components/docs/BranchName.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pages/components/docs/BranchName.md b/pages/components/docs/BranchName.md index cb2285719c5..187ca76a611 100644 --- a/pages/components/docs/BranchName.md +++ b/pages/components/docs/BranchName.md @@ -12,8 +12,9 @@ BranchName components get `COMMON` and `LAYOUT` system props. Read our [System P ## Component props -| Prop name | Type | Description | -| :- | :- | :- | -| is | String | | +| Prop name | Type | Description | Default | +| :- | :- | :- | :- | +| is | String | sets the HTML tag for the component | 'a' +| href | String | a URL to link the component to | n/a export const meta = {displayName: 'BranchName'} From 8306f2db21baa4b18e9f16f5c6831ba2d5a394b9 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 14:52:26 -0700 Subject: [PATCH 04/51] update Box docs --- pages/components/docs/Box.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/components/docs/Box.md b/pages/components/docs/Box.md index 94689bdb766..517772487a1 100644 --- a/pages/components/docs/Box.md +++ b/pages/components/docs/Box.md @@ -14,6 +14,6 @@ Box components get `COMMON` and `LAYOUT` system props. Read our [System Props](/ | Prop name | Type | Description | | :- | :- | :- | -| is | String | | +| is | String | sets the HTML tag for the component | export const meta = {displayName: 'Box'} From c496b06a60cd5fd23625532b25866310ee1b1101 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 14:52:34 -0700 Subject: [PATCH 05/51] update BorderBox docs --- pages/components/docs/BorderBox.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pages/components/docs/BorderBox.md b/pages/components/docs/BorderBox.md index 4a40d3b0172..47c822b4121 100644 --- a/pages/components/docs/BorderBox.md +++ b/pages/components/docs/BorderBox.md @@ -12,8 +12,6 @@ BorderBox components get `COMMON` and `LAYOUT` system props. Read our [System Pr ## Component props -| Prop name | Type | Description | -| :- | :- | :- | -| is | String | | +BorderBox does not get any additional props other than the system props mentioned above. export const meta = { displayName: 'BorderBox'} From 676d04f204aba494d04992cb47b7313ccd02b522 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 14:53:51 -0700 Subject: [PATCH 06/51] add Required column --- pages/components/docs/BranchName.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/components/docs/BranchName.md b/pages/components/docs/BranchName.md index 187ca76a611..1e346781892 100644 --- a/pages/components/docs/BranchName.md +++ b/pages/components/docs/BranchName.md @@ -12,9 +12,9 @@ BranchName components get `COMMON` and `LAYOUT` system props. Read our [System P ## Component props -| Prop name | Type | Description | Default | -| :- | :- | :- | :- | -| is | String | sets the HTML tag for the component | 'a' -| href | String | a URL to link the component to | n/a +| Prop name | Type | Description | Default | Required? | +| :- | :- | :- | :- | :- | +| is | String | sets the HTML tag for the component | 'a' | No +| href | String | a URL to link the component to | n/a | No export const meta = {displayName: 'BranchName'} From 23f4883146a24da9268a7082eea32ffcf9108596 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 15:10:32 -0700 Subject: [PATCH 07/51] update Button docs --- pages/components/docs/Button.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pages/components/docs/Button.md b/pages/components/docs/Button.md index ed5e1c818fb..b545249c994 100644 --- a/pages/components/docs/Button.md +++ b/pages/components/docs/Button.md @@ -1,9 +1,13 @@ -# Button +# Buttons -## Default example +## Default examples ```.jsx +Button Danger +Button Link +Button Outline +Button Primary ``` ## System props @@ -14,6 +18,11 @@ Button components get `COMMON` and `LAYOUT` system props. Read our [System Props | Prop name | Type | Description | | :- | :- | :- | -| is | String | | +| is | String | sets the HTML tag for the component, defaults to `button` | +| block | Boolean | adds `display: block` to the component | +| disabled | Boolean | sets the `disabled` attribute on the Button | +| grouped | Boolean | allows you to use Button in a line of Buttons without duplicate borders | +| onClick | Function | function to be called when Button is clicked | +| size | String | use `sm` for a small Button, or `large` for a large Button export const meta = {displayName: 'Button'} From a7b51454b059be15ccd5e21e2e2ca2cf5e900232 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 15:10:41 -0700 Subject: [PATCH 08/51] avatar and branchname tweaks --- pages/components/docs/Avatar.md | 10 +++++----- pages/components/docs/BranchName.md | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pages/components/docs/Avatar.md b/pages/components/docs/Avatar.md index 7fd1d6d2942..7c16ced2867 100644 --- a/pages/components/docs/Avatar.md +++ b/pages/components/docs/Avatar.md @@ -15,12 +15,12 @@ Avatar components get `color, spacing` system props. Read our [System Props](/sy ## Component props -| Prop name | Type | Description | +| Prop name | Type | Description | :- | :- | :- | -| alt | String | Passed through to alt on img tag | -| isChild | Boolean | adds the `avatar-child` class if present | -| size | Number | default: 20, adds the `avatar-small` class if less than 24 | -| src | String | The source url of the avatar image | +| alt | String | Passed through to alt on img tag +| isChild | Boolean | adds the `avatar-child` class if present +| size | Number | default: 20, adds the `avatar-small` class if less than 24 +| src | String | The source url of the avatar image export const meta = { displayName: 'Avatar' diff --git a/pages/components/docs/BranchName.md b/pages/components/docs/BranchName.md index 1e346781892..ef81e7f5f19 100644 --- a/pages/components/docs/BranchName.md +++ b/pages/components/docs/BranchName.md @@ -12,9 +12,9 @@ BranchName components get `COMMON` and `LAYOUT` system props. Read our [System P ## Component props -| Prop name | Type | Description | Default | Required? | -| :- | :- | :- | :- | :- | -| is | String | sets the HTML tag for the component | 'a' | No -| href | String | a URL to link the component to | n/a | No +| Prop name | Type | Description | +| :- | :- | :- | +| is | String | sets the HTML tag for the component | +| href | String | a URL to link the component to | export const meta = {displayName: 'BranchName'} From 851ab5901bfb8e40abac44f1e712a1daa4ffb4aa Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 15:25:40 -0700 Subject: [PATCH 09/51] set defualt size of CircleBadge to medium --- src/CircleBadge.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CircleBadge.js b/src/CircleBadge.js index 66369047281..ea380a002e1 100644 --- a/src/CircleBadge.js +++ b/src/CircleBadge.js @@ -5,7 +5,7 @@ import {withSystemProps, COMMON} from './system-props' const ICON_CLASS = 'CircleBadge-icon' -const sizeMapper = size => { +const sizeMapper = (size = 'medium') => { if (typeof size === 'number') return size const map = { small: 56, From 8114d4807cde0ede77c70f88860f092f580a884d Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 15:25:54 -0700 Subject: [PATCH 10/51] update CircleBadge docs --- pages/components/docs/CircleBadge.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/components/docs/CircleBadge.md b/pages/components/docs/CircleBadge.md index 975f9071556..bf572bb3f0b 100644 --- a/pages/components/docs/CircleBadge.md +++ b/pages/components/docs/CircleBadge.md @@ -16,6 +16,10 @@ CircleBadge components get `COMMON` and `LAYOUT` system props. Read our [System | Prop name | Type | Description | | :- | :- | :- | -| is | String | | +| is | String | sets the HTML tag for the component, defaults to `button` | +| alt | String | alt tag | +| size | String or Number | Use `small`, `medium`, or `large` for default sizes, or provide a custom size | +| src | String | URL for image used in badge if `is` is set to `img` | + export const meta = {displayName: 'CircleBadge'} From 14737c98b6be52e719a7a881be7538d56c001698 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 15:30:21 -0700 Subject: [PATCH 11/51] CircleOcticon docs --- pages/components/docs/CircleOcticon.md | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/pages/components/docs/CircleOcticon.md b/pages/components/docs/CircleOcticon.md index e21cf675555..f13a249134e 100644 --- a/pages/components/docs/CircleOcticon.md +++ b/pages/components/docs/CircleOcticon.md @@ -1,11 +1,22 @@ # CircleOcticon +## Default example + ```.jsx - - - - - + ``` + +## System props + +CircleOcticon components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. + +## Component props + +| Prop name | Type | Description | +| :- | :- | :- | +| icon | Octicon | Octicon component used in the component | +| size | Number | used to set the width and height of the component | + + export const meta = {displayName: 'CircleOcticon'} From 61dfbab764222c393550abf978be01c3647cd950 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 15:31:38 -0700 Subject: [PATCH 12/51] fix system props docs --- pages/components/docs/Avatar.md | 4 ++-- pages/components/docs/BranchName.md | 2 +- pages/components/docs/Button.md | 2 +- pages/components/docs/CircleBadge.md | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pages/components/docs/Avatar.md b/pages/components/docs/Avatar.md index 7c16ced2867..f6592e56755 100644 --- a/pages/components/docs/Avatar.md +++ b/pages/components/docs/Avatar.md @@ -11,11 +11,11 @@ Avatars are images that users can set as their profile picture. On GitHub, they' ## System props -Avatar components get `color, spacing` system props. Read our [System Props](/system-props) doc page for a full list of available props. +Avatar components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. ## Component props -| Prop name | Type | Description +| Prop name | Type | Description | :- | :- | :- | | alt | String | Passed through to alt on img tag | isChild | Boolean | adds the `avatar-child` class if present diff --git a/pages/components/docs/BranchName.md b/pages/components/docs/BranchName.md index ef81e7f5f19..450e4e0c06d 100644 --- a/pages/components/docs/BranchName.md +++ b/pages/components/docs/BranchName.md @@ -8,7 +8,7 @@ ## System props -BranchName components get `COMMON` and `LAYOUT` system props. Read our [System Props](/system-props) doc page for a full list of available props. +BranchName components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. ## Component props diff --git a/pages/components/docs/Button.md b/pages/components/docs/Button.md index b545249c994..f696d4772c7 100644 --- a/pages/components/docs/Button.md +++ b/pages/components/docs/Button.md @@ -12,7 +12,7 @@ ## System props -Button components get `COMMON` and `LAYOUT` system props. Read our [System Props](/system-props) doc page for a full list of available props. +Button components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. ## Component props diff --git a/pages/components/docs/CircleBadge.md b/pages/components/docs/CircleBadge.md index bf572bb3f0b..aa68a916494 100644 --- a/pages/components/docs/CircleBadge.md +++ b/pages/components/docs/CircleBadge.md @@ -10,7 +10,7 @@ ## System props -CircleBadge components get `COMMON` and `LAYOUT` system props. Read our [System Props](/system-props) doc page for a full list of available props. +CircleBadge components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. ## Component props @@ -19,7 +19,7 @@ CircleBadge components get `COMMON` and `LAYOUT` system props. Read our [System | is | String | sets the HTML tag for the component, defaults to `button` | | alt | String | alt tag | | size | String or Number | Use `small`, `medium`, or `large` for default sizes, or provide a custom size | -| src | String | URL for image used in badge if `is` is set to `img` | +| src | String | URL for image used in badge if `is` is set to `img` | export const meta = {displayName: 'CircleBadge'} From 154b393466008b5ac7a0814e55cdd19d7c75fb4d Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 14:52:18 -0700 Subject: [PATCH 13/51] add CounterLabel prop docs --- pages/components/docs/CounterLabel.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pages/components/docs/CounterLabel.md b/pages/components/docs/CounterLabel.md index 78055d39029..e31aadcb129 100644 --- a/pages/components/docs/CounterLabel.md +++ b/pages/components/docs/CounterLabel.md @@ -1,10 +1,21 @@ # CounterLabel +## Default example ```.jsx 12 13 13 ``` +## System props + +CounterLabel components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. + +## Component props + +| Prop name | Type | Description | +| :- | :- | :- | +| scheme | String | Pass in 'gray' for a gray background and white text, or 'gray-light' for a lighter gray background and dark text. Omitting the scheme prop renders the default counter scheme | + export const meta = {displayName: 'CounterLabel'} From 868c83721453e311039387768f22a0feccc023e3 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 21:50:22 -0700 Subject: [PATCH 14/51] add Details props docs --- pages/components/docs/Details.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pages/components/docs/Details.md b/pages/components/docs/Details.md index 1143ac9ae04..175e811f03f 100644 --- a/pages/components/docs/Details.md +++ b/pages/components/docs/Details.md @@ -26,4 +26,16 @@ With render prop
'hi'} /> ``` + +## System props + +Details components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. + +## Component props + +| Prop name | Type | Description | +| :- | :- | :- | +| open | Boolean | Sets the open/closed state of the Details component | +| render | Function | Optional render function as a prop, to allow you to handle toggling and open/closed state within a container component + export const meta = {displayName: 'Details'} From df866b25526098f3d4201688bf2d38e147902dfb Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 22:03:28 -0700 Subject: [PATCH 15/51] Donut chart system props --- pages/components/docs/DonutChart.md | 69 ++++------------------------- 1 file changed, 9 insertions(+), 60 deletions(-) diff --git a/pages/components/docs/DonutChart.md b/pages/components/docs/DonutChart.md index 89930c37269..20fae12e4a8 100644 --- a/pages/components/docs/DonutChart.md +++ b/pages/components/docs/DonutChart.md @@ -1,67 +1,16 @@ # DonutChart ```.jsx - - - With data prop - - - - - - - - - - - - With DonutSlice children - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + +``` - - - - +## System props - - - With DonutSlice children - +Details components get `space` system props. Read our [System Props](/system-props) doc page for a full list of available props. - - - - - - - - -``` export const meta = {displayName: 'DonutChart'} From 34206ee75d04516db2f936c83077bbd672025bf6 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 22:11:25 -0700 Subject: [PATCH 16/51] Dropdown system props docs --- pages/components/docs/DonutChart.md | 3 ++- pages/components/docs/Dropdown.md | 42 ++++++++--------------------- 2 files changed, 13 insertions(+), 32 deletions(-) diff --git a/pages/components/docs/DonutChart.md b/pages/components/docs/DonutChart.md index 20fae12e4a8..3a5f83ced85 100644 --- a/pages/components/docs/DonutChart.md +++ b/pages/components/docs/DonutChart.md @@ -1,5 +1,6 @@ # DonutChart +## Default example ```.jsx @@ -11,6 +12,6 @@ ## System props -Details components get `space` system props. Read our [System Props](/system-props) doc page for a full list of available props. +DonutChart components get `space` system props. Read our [System Props](/system-props) doc page for a full list of available props. export const meta = {displayName: 'DonutChart'} diff --git a/pages/components/docs/Dropdown.md b/pages/components/docs/Dropdown.md index 746e5251b2f..5cca61c5189 100644 --- a/pages/components/docs/Dropdown.md +++ b/pages/components/docs/Dropdown.md @@ -1,39 +1,19 @@ # Dropdown +## Default example ```.jsx - - Dropdown Primary - - -
  • Item 1
  • -
  • Item 2
  • -
  • Item 3
  • -
    -
    -
    + + +
  • Item 1
  • +
  • Item 2
  • +
  • Item 3
  • +
    +
    +``` - - Dropdown - - -
  • Item 1
  • -
  • Item 2
  • -
  • Item 3
  • -
    -
    -
    +## System props - - Dropdown with title - - -
  • Item 1
  • -
  • Item 2
  • -
  • Item 3
  • -
    -
    -
    -``` +Dropdown components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. export const meta = {displayName: 'Dropdown'} From fd6c28205e5db42bae55a614eee2369845bcdbbb Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 22:12:31 -0700 Subject: [PATCH 17/51] FilterList system props docs --- pages/components/docs/FilterList.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pages/components/docs/FilterList.md b/pages/components/docs/FilterList.md index 346db5c4c18..1a00436799d 100644 --- a/pages/components/docs/FilterList.md +++ b/pages/components/docs/FilterList.md @@ -1,18 +1,17 @@ # FilterList +## Default example + ```.jsx First Filter Second Filter Third Filter - -Small - - First Filter - Second Filter - Third Filter - ``` +## System props + +FilterList components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. + export const meta = {displayName: 'FilterList'} From 17290cdb3021f4ab056cdea3693072208349dc6f Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 22:13:28 -0700 Subject: [PATCH 18/51] Flash system props doccs --- pages/components/docs/Flash.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pages/components/docs/Flash.md b/pages/components/docs/Flash.md index 8013b8d5265..d8a1db3cc4b 100644 --- a/pages/components/docs/Flash.md +++ b/pages/components/docs/Flash.md @@ -1,12 +1,14 @@ # Flash +## Default example + ```.jsx - Flash - Flash yellow - Flash red Flash green - Flash full ``` +## System props + +Flash components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. + export const meta = {displayName: 'Flash'} From d31e2b3a697aeedd4a7e385eb8fa76c04bf74e78 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 22:15:39 -0700 Subject: [PATCH 19/51] flex system props docs --- pages/components/docs/Flex.md | 51 +++++++---------------------------- 1 file changed, 9 insertions(+), 42 deletions(-) diff --git a/pages/components/docs/Flex.md b/pages/components/docs/Flex.md index 1489ef0d51f..00161e9bbe0 100644 --- a/pages/components/docs/Flex.md +++ b/pages/components/docs/Flex.md @@ -1,7 +1,8 @@ # FlexContainer and FlexItem +## Default example + ```.jsx -FlexContainer + FlexItems @@ -21,49 +22,15 @@ +``` +## System props -FlexContainer + FlexItems direction set to 'column' - - - - - Item 1 - - - - - Item 2 - - - - - Item 3 - - - - +FlexContainer components get `FLEX_CONTAINER`, 'COMMON', and 'LAYOUT' system props. + +FlexItem components get `FLEX_ITEM`, 'COMMON', and 'LAYOUT' system props. + +Read our [System Props](/system-props) doc page for a full list of available props. -FlexContainer + FlexItems using tag prop set to "p" - - - - - Item 1 - - - - - Item 2 - - - - - Item 3 - - - - -``` export const meta = {displayName: 'Flex'} From 0183eccff4a5810c55c20c54a0bba87bbf782d49 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 22:16:59 -0700 Subject: [PATCH 20/51] heading system props docs --- pages/components/docs/Heading.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pages/components/docs/Heading.md b/pages/components/docs/Heading.md index 0688a6b6180..bf76ed62f43 100644 --- a/pages/components/docs/Heading.md +++ b/pages/components/docs/Heading.md @@ -1,9 +1,12 @@ # Heading +## Default example ```.jsx With fontSize={1} -With fontSize={2} -With fontSize={3} ``` +## System props + +Dropdown components get `TYPOGRAPHY` and 'COMMON' system props. Read our [System Props](/system-props) doc page for a full list of available props. + export const meta = {displayName: 'Heading'} From 5361bb700318129b63e725b86bcef6fbb82ad901 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 22:18:06 -0700 Subject: [PATCH 21/51] Label system props docs --- pages/components/docs/Label.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pages/components/docs/Label.md b/pages/components/docs/Label.md index 21424a838fd..ea17509007d 100644 --- a/pages/components/docs/Label.md +++ b/pages/components/docs/Label.md @@ -1,13 +1,15 @@ # Label +## Default example + ```.jsx - - - - - - - - + + + ``` + +## System props + +Dropdown components get 'COMMON' system props. Read our [System Props](/system-props) doc page for a full list of available props. + export const meta = {displayName: 'Label'} From 1b6288c7221086121869e140e9e5baf59c090534 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 22:19:34 -0700 Subject: [PATCH 22/51] Link system props docs --- pages/components/docs/Heading.md | 2 +- pages/components/docs/Label.md | 2 +- pages/components/docs/Link.md | 10 +++++++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pages/components/docs/Heading.md b/pages/components/docs/Heading.md index bf76ed62f43..ecdd0ea4b1c 100644 --- a/pages/components/docs/Heading.md +++ b/pages/components/docs/Heading.md @@ -7,6 +7,6 @@ ## System props -Dropdown components get `TYPOGRAPHY` and 'COMMON' system props. Read our [System Props](/system-props) doc page for a full list of available props. +Heading components get `TYPOGRAPHY` and 'COMMON' system props. Read our [System Props](/system-props) doc page for a full list of available props. export const meta = {displayName: 'Heading'} diff --git a/pages/components/docs/Label.md b/pages/components/docs/Label.md index ea17509007d..5efffbec44b 100644 --- a/pages/components/docs/Label.md +++ b/pages/components/docs/Label.md @@ -10,6 +10,6 @@ ## System props -Dropdown components get 'COMMON' system props. Read our [System Props](/system-props) doc page for a full list of available props. +Label components get 'COMMON' system props. Read our [System Props](/system-props) doc page for a full list of available props. export const meta = {displayName: 'Label'} diff --git a/pages/components/docs/Link.md b/pages/components/docs/Link.md index 88c066beecf..8abf67f13c5 100644 --- a/pages/components/docs/Link.md +++ b/pages/components/docs/Link.md @@ -1,9 +1,13 @@ # Link +## Default example + ```.jsx Link -Link muted -Link gray -Link gray-dark ``` + +## System props + +Link components get 'COMMON' system props. Read our [System Props](/system-props) doc page for a full list of available props. + export const meta = {displayName: 'Link'} From a6060a34e2d8b2060400f6c12ee12b56b7950694 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 22:20:11 -0700 Subject: [PATCH 23/51] MergeStatus system props docs --- pages/components/docs/MergeStatus.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pages/components/docs/MergeStatus.md b/pages/components/docs/MergeStatus.md index d82e1f826b1..f7f41f96125 100644 --- a/pages/components/docs/MergeStatus.md +++ b/pages/components/docs/MergeStatus.md @@ -1,12 +1,16 @@ # MergeStatus + +## Default example ```.jsx - - - - - - + + + + ``` +## System props + +MergeStatus components get 'COMMON' system props. Read our [System Props](/system-props) doc page for a full list of available props. + export const meta = {displayName: 'MergeStatus'} From 7408e8666cf394957448433ab19b8020eefe7df0 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 22:21:40 -0700 Subject: [PATCH 24/51] PointerBox system props docs --- pages/components/docs/PointerBox.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pages/components/docs/PointerBox.md b/pages/components/docs/PointerBox.md index 1ddd82aa068..c2157ab3ca5 100644 --- a/pages/components/docs/PointerBox.md +++ b/pages/components/docs/PointerBox.md @@ -1,9 +1,15 @@ # PointerBox +## Default example + ```.jsx PointerBox ``` +## System props + +PointerBox components get 'LAYOUT' and 'COMMON' system props. Read our [System Props](/system-props) doc page for a full list of available props. + export const meta = {displayName: 'PointerBox'} From fe829bf26759e503039d3c5dbf43855e4e87c617 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 22:22:31 -0700 Subject: [PATCH 25/51] Position system props docs --- pages/components/docs/Position.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pages/components/docs/Position.md b/pages/components/docs/Position.md index 918c8486e6b..98e4cb19446 100644 --- a/pages/components/docs/Position.md +++ b/pages/components/docs/Position.md @@ -1,5 +1,7 @@ # Position Components +## Default examples + ```.jsx Relative + Absolute @@ -33,4 +35,8 @@ ``` +## System props + +Position components get 'POSITION', 'LAYOUT' and 'COMMON' system props. Read our [System Props](/system-props) doc page for a full list of available props. + export const meta = {displayName: 'Position'} From 38e352acf861bdb98011be45e938618e6ab55a1d Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 22:25:45 -0700 Subject: [PATCH 26/51] add code quotes --- pages/components/docs/Flex.md | 4 +- pages/components/docs/Heading.md | 2 +- pages/components/docs/Label.md | 2 +- pages/components/docs/Link.md | 2 +- pages/components/docs/MergeStatus.md | 2 +- pages/components/docs/PointerBox.md | 2 +- pages/components/docs/Position.md | 2 +- pages/components/docs/StateLabel.md | 78 ++-------------------------- 8 files changed, 13 insertions(+), 81 deletions(-) diff --git a/pages/components/docs/Flex.md b/pages/components/docs/Flex.md index 00161e9bbe0..8b70b1a5cc3 100644 --- a/pages/components/docs/Flex.md +++ b/pages/components/docs/Flex.md @@ -26,9 +26,9 @@ ## System props -FlexContainer components get `FLEX_CONTAINER`, 'COMMON', and 'LAYOUT' system props. +FlexContainer components get `FLEX_CONTAINER`, `COMMON`, and `LAYOUT` system props. -FlexItem components get `FLEX_ITEM`, 'COMMON', and 'LAYOUT' system props. +FlexItem components get `FLEX_ITEM`, `COMMON`, and `LAYOUT` system props. Read our [System Props](/system-props) doc page for a full list of available props. diff --git a/pages/components/docs/Heading.md b/pages/components/docs/Heading.md index ecdd0ea4b1c..78c2d7051c3 100644 --- a/pages/components/docs/Heading.md +++ b/pages/components/docs/Heading.md @@ -7,6 +7,6 @@ ## System props -Heading components get `TYPOGRAPHY` and 'COMMON' system props. Read our [System Props](/system-props) doc page for a full list of available props. +Heading components get `TYPOGRAPHY` and `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. export const meta = {displayName: 'Heading'} diff --git a/pages/components/docs/Label.md b/pages/components/docs/Label.md index 5efffbec44b..8cd3a0b06b2 100644 --- a/pages/components/docs/Label.md +++ b/pages/components/docs/Label.md @@ -10,6 +10,6 @@ ## System props -Label components get 'COMMON' system props. Read our [System Props](/system-props) doc page for a full list of available props. +Label components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. export const meta = {displayName: 'Label'} diff --git a/pages/components/docs/Link.md b/pages/components/docs/Link.md index 8abf67f13c5..821c38b5497 100644 --- a/pages/components/docs/Link.md +++ b/pages/components/docs/Link.md @@ -8,6 +8,6 @@ ## System props -Link components get 'COMMON' system props. Read our [System Props](/system-props) doc page for a full list of available props. +Link components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. export const meta = {displayName: 'Link'} diff --git a/pages/components/docs/MergeStatus.md b/pages/components/docs/MergeStatus.md index f7f41f96125..1d2243a9b22 100644 --- a/pages/components/docs/MergeStatus.md +++ b/pages/components/docs/MergeStatus.md @@ -11,6 +11,6 @@ ## System props -MergeStatus components get 'COMMON' system props. Read our [System Props](/system-props) doc page for a full list of available props. +MergeStatus components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. export const meta = {displayName: 'MergeStatus'} diff --git a/pages/components/docs/PointerBox.md b/pages/components/docs/PointerBox.md index c2157ab3ca5..040fc7c8043 100644 --- a/pages/components/docs/PointerBox.md +++ b/pages/components/docs/PointerBox.md @@ -10,6 +10,6 @@ ## System props -PointerBox components get 'LAYOUT' and 'COMMON' system props. Read our [System Props](/system-props) doc page for a full list of available props. +PointerBox components get `LAYOUT` and `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. export const meta = {displayName: 'PointerBox'} diff --git a/pages/components/docs/Position.md b/pages/components/docs/Position.md index 98e4cb19446..0f48c7c0ba3 100644 --- a/pages/components/docs/Position.md +++ b/pages/components/docs/Position.md @@ -37,6 +37,6 @@ ## System props -Position components get 'POSITION', 'LAYOUT' and 'COMMON' system props. Read our [System Props](/system-props) doc page for a full list of available props. +Position components get `POSITION`, `LAYOUT` and `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. export const meta = {displayName: 'Position'} diff --git a/pages/components/docs/StateLabel.md b/pages/components/docs/StateLabel.md index a9e5904eb45..e87e0803b7c 100644 --- a/pages/components/docs/StateLabel.md +++ b/pages/components/docs/StateLabel.md @@ -1,81 +1,13 @@ # StateLabel -```.jsx - - Open - - - Closed - - - Merged - +## Default example -By state (Octicons built in) - - Unknown - - +```.jsx Open - - - Closed - - - Merged - - - Reopened - +``` -By color - - Invalid - - - Green - - - Red - - - Purple - +## System props -Small, by state - - Unknown - - Open - - - Closed - - - Merged - - - Reopened - - +StateLabel components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. -Small, by color - - - Invalid - - - Green - - - Red - - - Purple - - }> - Custom Octicon - - -``` export const meta = {displayName: 'StateLabel'} From 9ef50ce7939329bdb7ae11a195f459796e933966 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 22:28:52 -0700 Subject: [PATCH 27/51] Text system props docs --- pages/components/docs/Text.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pages/components/docs/Text.md b/pages/components/docs/Text.md index d408b302bfd..cdcb6d2b6fd 100644 --- a/pages/components/docs/Text.md +++ b/pages/components/docs/Text.md @@ -1,12 +1,12 @@ # Text +## Default example ```.jsx -Text -Text bold -Text green -Text lineHeight 'condensed' -Text fontSize 4 -Text padding 4 +Text ``` +## System props + +Text components get `TYPOGRAPHY` and `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. + export const meta = {displayName: 'Text'} From 170aecbcd923d8e14577390c4597a50a15d98ed0 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 22:28:59 -0700 Subject: [PATCH 28/51] TextInput system props docs --- pages/components/docs/TextInput.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pages/components/docs/TextInput.md b/pages/components/docs/TextInput.md index 68a7d963119..917b426e530 100644 --- a/pages/components/docs/TextInput.md +++ b/pages/components/docs/TextInput.md @@ -1,14 +1,13 @@ # TextInput +## Default example + ```.jsx +``` -Text Input Sizes - - +## System props -Text Input - Block - -``` +TextInput components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. export const meta = {displayName: 'TextInput'} From 798bf6ff85e9ecaa341b3d91c9eeb72e7431e937 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 22:29:44 -0700 Subject: [PATCH 29/51] tooltip system props docs --- pages/components/docs/Tooltip.md | 44 ++++---------------------------- 1 file changed, 5 insertions(+), 39 deletions(-) diff --git a/pages/components/docs/Tooltip.md b/pages/components/docs/Tooltip.md index a6f03586e5c..8980ac84b88 100644 --- a/pages/components/docs/Tooltip.md +++ b/pages/components/docs/Tooltip.md @@ -1,49 +1,15 @@ # Tooltip +## Default example + ```.jsx -Basic Tooltip Text with a tooltip +``` -Directions -{Tooltip.directions.map(dir => ( - - - Tooltip direction="${dir}" - - -))} - - -Word wrap - - - Word wrapping tooltip - - - -Alignment -{Tooltip.alignments.map(align => ( - - - Tooltip align="${align}" - - -))} - +## System props -No Delay - - - Text with a tooltip - -` -``` +Tooltip components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. export const meta = {displayName: 'Tooltip'} From 6332ec5919758a4f250e4834aff1a51d7590218c Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Sep 2018 22:31:05 -0700 Subject: [PATCH 30/51] underlinenav system props docs --- pages/components/docs/UnderlineNav.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pages/components/docs/UnderlineNav.md b/pages/components/docs/UnderlineNav.md index 40fac39b577..e16f983d046 100644 --- a/pages/components/docs/UnderlineNav.md +++ b/pages/components/docs/UnderlineNav.md @@ -1,5 +1,13 @@ # UnderlineNav + +To use UnderlineNav with [react-router](https://github.com/ReactTraining/react-router) or +[react-router-dom](https://www.npmjs.com/package/react-router-dom), pass +```is={NavLink}``` and omit the ```selected``` prop. +This ensures that the NavLink gets ```activeClassName='selected'``` + +## Default example + ```.jsx Using {''} @@ -13,10 +21,9 @@ ``` - To use UnderlineNav with [react-router](https://github.com/ReactTraining/react-router) or - [react-router-dom](https://www.npmjs.com/package/react-router-dom), pass - ```is={NavLink}``` and omit the ```selected``` prop. - This ensures that the NavLink gets ```activeClassName='selected'``` +## System props + +UnderlineNav and UnderlineNavLink components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. export const meta = {displayName: 'UnderlineNav'} From e11dcc59356663cbed813e547fbb27f5b0dab2e1 Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 14 Sep 2018 07:28:04 -0700 Subject: [PATCH 31/51] docs tweaks --- pages/components/docs/CircleBadge.md | 4 ++-- pages/components/docs/CounterLabel.md | 2 +- pages/components/docs/Details.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/components/docs/CircleBadge.md b/pages/components/docs/CircleBadge.md index aa68a916494..2165aac3da4 100644 --- a/pages/components/docs/CircleBadge.md +++ b/pages/components/docs/CircleBadge.md @@ -16,10 +16,10 @@ CircleBadge components get `COMMON` system props. Read our [System Props](/syste | Prop name | Type | Description | | :- | :- | :- | -| is | String | sets the HTML tag for the component, defaults to `button` | +| is | String | sets the HTML tag for the component, defaults to `div` | | alt | String | alt tag | | size | String or Number | Use `small`, `medium`, or `large` for default sizes, or provide a custom size | -| src | String | URL for image used in badge if `is` is set to `img` | + export const meta = {displayName: 'CircleBadge'} diff --git a/pages/components/docs/CounterLabel.md b/pages/components/docs/CounterLabel.md index e31aadcb129..ba0b8888cda 100644 --- a/pages/components/docs/CounterLabel.md +++ b/pages/components/docs/CounterLabel.md @@ -16,6 +16,6 @@ CounterLabel components get `COMMON` system props. Read our [System Props](/syst | Prop name | Type | Description | | :- | :- | :- | -| scheme | String | Pass in 'gray' for a gray background and white text, or 'gray-light' for a lighter gray background and dark text. Omitting the scheme prop renders the default counter scheme | +| scheme | String | Pass in 'gray' for a darker gray background and white text, or 'gray-light' for a lighter gray background and dark text. Omitting the scheme prop renders the default counter scheme | export const meta = {displayName: 'CounterLabel'} diff --git a/pages/components/docs/Details.md b/pages/components/docs/Details.md index 175e811f03f..2bdb2e355c6 100644 --- a/pages/components/docs/Details.md +++ b/pages/components/docs/Details.md @@ -36,6 +36,6 @@ Details components get `COMMON` system props. Read our [System Props](/system-pr | Prop name | Type | Description | | :- | :- | :- | | open | Boolean | Sets the open/closed state of the Details component | -| render | Function | Optional render function as a prop, to allow you to handle toggling and open/closed state within a container component +| render | Function | Optional render function, to allow you to handle toggling and open/closed state from a container component. export const meta = {displayName: 'Details'} From a597196c4ed90befcf83889140939b6b12c9bcaa Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 14 Sep 2018 07:28:14 -0700 Subject: [PATCH 32/51] add component props docs for DonutChart --- pages/components/docs/DonutChart.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pages/components/docs/DonutChart.md b/pages/components/docs/DonutChart.md index 3a5f83ced85..765d56b8270 100644 --- a/pages/components/docs/DonutChart.md +++ b/pages/components/docs/DonutChart.md @@ -14,4 +14,11 @@ DonutChart components get `space` system props. Read our [System Props](/system-props) doc page for a full list of available props. +## Component props + +| Prop name | Type | Description | +| :- | :- | :- | +| data | Object | Use the keys `error`, `pending`, and `success` to set values used to generate slices in the chart | +| size | Number | Used to set the width and height of the component + export const meta = {displayName: 'DonutChart'} From 4b65a7daf84eaae061f78069adccf59a0558beb1 Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 14 Sep 2018 07:31:14 -0700 Subject: [PATCH 33/51] add Dropdown component props --- pages/components/docs/Dropdown.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pages/components/docs/Dropdown.md b/pages/components/docs/Dropdown.md index 5cca61c5189..c8299f68902 100644 --- a/pages/components/docs/Dropdown.md +++ b/pages/components/docs/Dropdown.md @@ -16,4 +16,11 @@ Dropdown components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. +## Component props + +| Prop name | Type | Description | +| :- | :- | :- | +| scheme | String | Button scheme used to style the component, can be one of `danger`, `outline` or `primary` | +| title | String | Optional prop to set the text in the Dropdown button + export const meta = {displayName: 'Dropdown'} From a3ba7f5e1321939b8faae42bfc823e5a6b639232 Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 14 Sep 2018 07:32:36 -0700 Subject: [PATCH 34/51] add FilterList component props --- pages/components/docs/FilterList.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pages/components/docs/FilterList.md b/pages/components/docs/FilterList.md index 1a00436799d..31cfd83d467 100644 --- a/pages/components/docs/FilterList.md +++ b/pages/components/docs/FilterList.md @@ -14,4 +14,10 @@ FilterList components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. +## Component props + +| Prop name | Type | Description | +| :- | :- | :- | +| small | Boolean | Used to create a smaller version of the standard FilterList| + export const meta = {displayName: 'FilterList'} From dca747ecd2479ebcd3232c4657207a5faf040f3a Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 14 Sep 2018 07:34:39 -0700 Subject: [PATCH 35/51] add Flash component prop docs --- pages/components/docs/Flash.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pages/components/docs/Flash.md b/pages/components/docs/Flash.md index d8a1db3cc4b..a1daa9c2869 100644 --- a/pages/components/docs/Flash.md +++ b/pages/components/docs/Flash.md @@ -11,4 +11,11 @@ Flash components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. +## Component props + +| Prop name | Type | Description | +| :- | :- | :- | +| full | Boolean | Creates a full width Flash component| +| scheme | String | Can be one of `green`, `yellow`, or `red` - sets the background color, border, and text color of the Flash component + export const meta = {displayName: 'Flash'} From 64cb4d5bdfcd5d2ecdb271466e0b1322696bf0cd Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 14 Sep 2018 07:36:15 -0700 Subject: [PATCH 36/51] Flex component props docs --- pages/components/docs/Flex.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pages/components/docs/Flex.md b/pages/components/docs/Flex.md index 8b70b1a5cc3..bf86d3e0cf8 100644 --- a/pages/components/docs/Flex.md +++ b/pages/components/docs/Flex.md @@ -32,5 +32,8 @@ FlexItem components get `FLEX_ITEM`, `COMMON`, and `LAYOUT` system props. Read our [System Props](/system-props) doc page for a full list of available props. +## Component props + +FlexContainer and FlexItem do not get any additional props other than the system props mentioned above. export const meta = {displayName: 'Flex'} From 01abd523cbdef6680c5d25a36486777886b6baf7 Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 14 Sep 2018 07:37:02 -0700 Subject: [PATCH 37/51] Heading component props docs --- pages/components/docs/Heading.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/components/docs/Heading.md b/pages/components/docs/Heading.md index 78c2d7051c3..09d32121c12 100644 --- a/pages/components/docs/Heading.md +++ b/pages/components/docs/Heading.md @@ -9,4 +9,8 @@ Heading components get `TYPOGRAPHY` and `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. +## Component props + +Heading does not get any additional props other than the system props mentioned above. + export const meta = {displayName: 'Heading'} From c4b9ae88477d1d8fecdf9c8d790fa28ddaa69764 Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 14 Sep 2018 07:39:11 -0700 Subject: [PATCH 38/51] Label component props docs --- pages/components/docs/Label.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pages/components/docs/Label.md b/pages/components/docs/Label.md index 8cd3a0b06b2..5a8446960b1 100644 --- a/pages/components/docs/Label.md +++ b/pages/components/docs/Label.md @@ -12,4 +12,11 @@ Label components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. +## Component props + +| Prop name | Type | Description | +| :- | :- | :- | +| outline | Boolean | Creates an outline style label | +| scheme | String | Can be one of `gray`, `gray-darker`, `orange` or `green` - sets the background color and text color of the Label component + export const meta = {displayName: 'Label'} From fc605e813af30139a945c418317daac8b3a21ace Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 14 Sep 2018 07:41:16 -0700 Subject: [PATCH 39/51] add Link component prop docs --- pages/components/docs/Link.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pages/components/docs/Link.md b/pages/components/docs/Link.md index 821c38b5497..34c7d4e9e28 100644 --- a/pages/components/docs/Link.md +++ b/pages/components/docs/Link.md @@ -10,4 +10,13 @@ Link components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. +## Component props + +| Prop name | Type | Description | +| :- | :- | :- | +| href | String | URL to be used for the Link | +| muted | Boolean | Applies a gray text color to the Link | +| nounderline | Boolean | Removes underline from the Link | +| scheme | String | Can be `gray` or `gray-dark`, sets the text color accordingly. | + export const meta = {displayName: 'Link'} From 9c2ca03d9a7bbefe46226baafce9e883a29d5217 Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 14 Sep 2018 07:42:53 -0700 Subject: [PATCH 40/51] MergeStatus component prop docs --- pages/components/docs/MergeStatus.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pages/components/docs/MergeStatus.md b/pages/components/docs/MergeStatus.md index 1d2243a9b22..743c123470e 100644 --- a/pages/components/docs/MergeStatus.md +++ b/pages/components/docs/MergeStatus.md @@ -13,4 +13,10 @@ MergeStatus components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. +## Component props + +| Prop name | Type | Description | +| :- | :- | :- | +| state | String | Can be one of `ready`, `invalid`, `merged`, or `pending`. Sets the appropriate background and text color on the component. | + export const meta = {displayName: 'MergeStatus'} From 8418f11b4cf444201a26720ce6e6d3f08a949c6d Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 14 Sep 2018 07:49:44 -0700 Subject: [PATCH 41/51] PointerBox component props docs --- pages/components/docs/PointerBox.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pages/components/docs/PointerBox.md b/pages/components/docs/PointerBox.md index 040fc7c8043..3458332878c 100644 --- a/pages/components/docs/PointerBox.md +++ b/pages/components/docs/PointerBox.md @@ -12,4 +12,10 @@ PointerBox components get `LAYOUT` and `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. +## Component props + +| Prop name | Type | Description | +| :- | :- | :- | +| caret | String | Sets the location of the caret. The format is `[edge]-[position on edge]`. For example, `right-top` will position the caret on the top of the right edge of the box. Use `top`, `right`, `bottom`, or `left` to position a caret in the center of that edge. | + export const meta = {displayName: 'PointerBox'} From 006b4ad9e8bd26cd3a605fc6fb1ad7fe70a4bbdb Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 14 Sep 2018 07:50:52 -0700 Subject: [PATCH 42/51] Position component props docs --- pages/components/docs/Position.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/components/docs/Position.md b/pages/components/docs/Position.md index 0f48c7c0ba3..77c91cbf174 100644 --- a/pages/components/docs/Position.md +++ b/pages/components/docs/Position.md @@ -39,4 +39,8 @@ Position components get `POSITION`, `LAYOUT` and `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. +## Component props + +Position does not get any additional props other than the system props mentioned above. + export const meta = {displayName: 'Position'} From f8e0c16c3ddc2b66a91013e5fb7d3ddc59a5f1c1 Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 14 Sep 2018 08:43:52 -0700 Subject: [PATCH 43/51] StateLabel component docs --- pages/components/docs/StateLabel.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pages/components/docs/StateLabel.md b/pages/components/docs/StateLabel.md index e87e0803b7c..e277445ee9b 100644 --- a/pages/components/docs/StateLabel.md +++ b/pages/components/docs/StateLabel.md @@ -10,4 +10,12 @@ StateLabel components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. +## Component props + +| Prop name | Type | Description | +| :- | :- | :- | +| icon | Node or Boolean | Provide a component for the Icon or set to `true` to match the icon to the `state` prop | +| small | Boolean | Used to create a smaller version of the default StateLabel | +| state | String | Can be one of `open`, `reopened`, `closed`, or `merged`. Used to set background color and Octicon. + export const meta = {displayName: 'StateLabel'} From e6e9c721b36f2f9979331e8c923470310a731f19 Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 14 Sep 2018 08:51:00 -0700 Subject: [PATCH 44/51] Text component prop docs --- pages/components/docs/Text.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/components/docs/Text.md b/pages/components/docs/Text.md index cdcb6d2b6fd..6db4590ffb6 100644 --- a/pages/components/docs/Text.md +++ b/pages/components/docs/Text.md @@ -9,4 +9,8 @@ Text components get `TYPOGRAPHY` and `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. +## Component props + +Text does not get any additional props other than the system props mentioned above. + export const meta = {displayName: 'Text'} From 794a0852cdb9778668835c283796b6746dd007a3 Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 14 Sep 2018 08:51:09 -0700 Subject: [PATCH 45/51] TextInput component prop docs --- pages/components/docs/TextInput.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pages/components/docs/TextInput.md b/pages/components/docs/TextInput.md index 917b426e530..9512d186714 100644 --- a/pages/components/docs/TextInput.md +++ b/pages/components/docs/TextInput.md @@ -10,4 +10,19 @@ TextInput components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. +## Component props + +| Prop name | Type | Description | +| :- | :- | :- | +| autocomplete | String | Allows user to set `autocomplete` attribute on input. See [MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autocomplete) for attribute documentation. | +| block | Boolean | Adds `display: block` to element | +| disabled | Boolean | Sets the `disabled` attribute on the element | +| id | String | Sets the `id` attribute on the element | +| name | String | Sets the `name` attribute on the element | +| onChange | Function | Function to be called when content in Input changes | +| placeholder | String | Sets the placeholder text | +| required | Boolean | Sets the `required` attribute on the element | +| size | String | Can be either `small` or `large`. Creates a smaller or larger input than the default. +| value | String | Current value of the Input. | + export const meta = {displayName: 'TextInput'} From bf5f18f9bb5dd5733e2fe1272ac13fff14c29b9f Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 14 Sep 2018 08:55:04 -0700 Subject: [PATCH 46/51] Add tooltip component prop docs --- pages/components/docs/Tooltip.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pages/components/docs/Tooltip.md b/pages/components/docs/Tooltip.md index 8980ac84b88..d5da4a912e7 100644 --- a/pages/components/docs/Tooltip.md +++ b/pages/components/docs/Tooltip.md @@ -12,4 +12,15 @@ Tooltip components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. +## Component props + +| Prop name | Type | Description | +| :- | :- | :- | +| align | String | Can be either `left` or `right`.| +| direction | String | Can be one of 'n', `ne`, `e`, `se`, `s`, `sw`, `w`, `nw` | Sets where the tooltip renders in relation to the target. | +| noDelay | Boolean | When set to `true`, tooltip appears without any delay | +| text | String | Text used in `aria-label` (for accessibility). +| wrap | Boolean | Use `true` to allow text within tooltip to wrap. + + export const meta = {displayName: 'Tooltip'} From 8b958a902666cfe652d12b591d9b0aac61dddcb5 Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 14 Sep 2018 08:59:58 -0700 Subject: [PATCH 47/51] UnderlineNav component prop docs --- pages/components/docs/Box.md | 2 +- pages/components/docs/UnderlineNav.md | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/pages/components/docs/Box.md b/pages/components/docs/Box.md index 517772487a1..33763a84a33 100644 --- a/pages/components/docs/Box.md +++ b/pages/components/docs/Box.md @@ -14,6 +14,6 @@ Box components get `COMMON` and `LAYOUT` system props. Read our [System Props](/ | Prop name | Type | Description | | :- | :- | :- | -| is | String | sets the HTML tag for the component | +| is | String | Sets the HTML tag for the component | export const meta = {displayName: 'Box'} diff --git a/pages/components/docs/UnderlineNav.md b/pages/components/docs/UnderlineNav.md index e16f983d046..be743bb888d 100644 --- a/pages/components/docs/UnderlineNav.md +++ b/pages/components/docs/UnderlineNav.md @@ -26,4 +26,20 @@ This ensures that the NavLink gets ```activeClassName='selected'``` UnderlineNav and UnderlineNavLink components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props. +## Component props + +### UnderlineNav +| Prop name | Type | Description | +| :- | :- | :- | +| actions | Node | Place another element, such as a button, to the opposite side of the navigation items.| +| align | String | Use `right` to have navigation items aligned right. | +| full | Boolean | Used to make navigation fill the width of the container. | +| label | String | Used to set the `aria-label` on the top level `