Skip to content

Commit

Permalink
added (literal) indicator to documented props that are literals
Browse files Browse the repository at this point in the history
  • Loading branch information
dfee committed Jun 13, 2019
1 parent 0f36191 commit 3129890
Show file tree
Hide file tree
Showing 32 changed files with 215 additions and 215 deletions.
14 changes: 7 additions & 7 deletions src/base/__docs__/generic.docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Here is an example of rendering as a `<Notification>` component, and passing thr
},
pull: {
description: "moves an element to the left or right",
typeName: "string",
typeName: "string (literal)",
typeTip: mapEnumerable(DEFAULTS.floatPulledAlignments),
},
}}
Expand Down Expand Up @@ -119,7 +119,7 @@ Here is an example of rendering as a `<Notification>` component, and passing thr
props={{
backgroundColor: {
description: "sets the background color",
typeName: "string",
typeName: "string (literal)",
typeTip: mapEnumerable([...DEFAULTS.colors, ...DEFAULTS.shades]),
},
italic: {
Expand All @@ -128,27 +128,27 @@ Here is an example of rendering as a `<Notification>` component, and passing thr
},
textAlign: {
description: "sets the alignment of the text",
typeName: "string",
typeName: "string (literal)",
typeTip: mapEnumerable(DEFAULTS.textAlignments),
},
textColor: {
description: "sets the text color",
typeName: "string",
typeName: "string (literal)",
typeTip: mapEnumerable([...DEFAULTS.colors, ...DEFAULTS.shades]),
},
textSize: {
description: "sets the text size",
typeName: "string",
typeName: "number (literal)",
typeTip: mapEnumerable(DEFAULTS.textSizes),
},
textTransform: {
description: "alters the text capitalization",
typeName: "string",
typeName: "string (literal)",
typeTip: mapEnumerable(DEFAULTS.textSizes),
},
textWeight: {
description: "sets the text weight",
typeName: "string",
typeName: "string (literal)",
typeTip: mapEnumerable(DEFAULTS.textWeights),
},
}}
Expand Down
22 changes: 11 additions & 11 deletions src/components/breadcrumb/__docs__/breadcrumb.docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ import {
faBook,
faHome,
faPuzzlePiece,
faThumbsUp
faThumbsUp,
} from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { Playground } from "docz";

import {
ForwardRefAsExoticComponentDoc,
OptionBlock,
mapEnumerable
mapEnumerable,
} from "src/__docs__/components";
import { DEFAULTS } from "src/base/helpers/variables";
import { Block, Title, Icon } from "src/elements";
Expand Down Expand Up @@ -154,19 +154,19 @@ Use the `size` prop on `<Breadcrumb>` to specify the size of the breadcrumbs.
props={{
align: {
description: "set the breadcrumb group's alignment",
typeName: "string",
typeTip: mapEnumerable(BREADCRUMB_DEFAULTS.alignments)
typeName: "string (literal)",
typeTip: mapEnumerable(BREADCRUMB_DEFAULTS.alignments),
},
separator: {
description: "set the breadcrumb group's separator",
typeName: "string",
typeTip: mapEnumerable(BREADCRUMB_DEFAULTS.separators)
typeName: "string (literal)",
typeTip: mapEnumerable(BREADCRUMB_DEFAULTS.separators),
},
size: {
description: "set the breadcrumb group's size",
typeName: "string",
typeTip: mapEnumerable(BREADCRUMB_DEFAULTS.sizes)
}
typeName: "string (literal)",
typeTip: mapEnumerable(BREADCRUMB_DEFAULTS.sizes),
},
}}
/>

Expand All @@ -176,7 +176,7 @@ Use the `size` prop on `<Breadcrumb>` to specify the size of the breadcrumbs.
props={{
active: {
description: "marks the breadcrumb as active",
typeName: "boolean"
}
typeName: "boolean",
},
}}
/>
8 changes: 4 additions & 4 deletions src/components/card/__docs__/card.docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Playground } from "docz";

import {
ForwardRefAsExoticComponentDoc,
mapEnumerable
mapEnumerable,
} from "src/__docs__/components";
import { DEFAULTS } from "src/base/helpers/variables";
import { Media } from "src/components";
Expand Down Expand Up @@ -198,9 +198,9 @@ An all-around flexible and composable component.
props={{
align: {
description: "set the alignment of the title",
typeName: "string",
typeTip: mapEnumerable(CARD_HEADER_TITLE_DEFAULTS.alignments)
}
typeName: "string (literal)",
typeTip: mapEnumerable(CARD_HEADER_TITLE_DEFAULTS.alignments),
},
}}
/>

Expand Down
28 changes: 14 additions & 14 deletions src/components/dropdown/__docs__/dropdown.docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Playground } from "docz";

import {
ForwardRefAsExoticComponentDoc,
mapEnumerable
mapEnumerable,
} from "src/__docs__/components";
import { DEFAULTS } from "src/base/helpers/variables";
import { Level } from "src/components";
Expand Down Expand Up @@ -276,26 +276,26 @@ Use the `up` prop on `<Dropdown>` for the menu to appear **above** the `<Dropdow
active: {
description:
"set the dropdown as active (useful with the `managed` prop)",
typeName: "boolean"
typeName: "boolean",
},
align: {
description: "set the dropdown menu's alignment",
typeName: "string",
typeTip: mapEnumerable(DROPDOWN_DEFAULTS.alignments)
typeName: "string (literal)",
typeTip: mapEnumerable(DROPDOWN_DEFAULTS.alignments),
},
hoverable: {
description: "open the dropdown on mouse-over",
typeName: "boolean"
typeName: "boolean",
},
managed: {
description:
"enable the usage of the `active` prop to open and close the dropdown menu",
typeName: "boolean"
typeName: "boolean",
},
up: {
description: "open the menu above the dropdown",
typeName: "boolean"
}
typeName: "boolean",
},
}}
/>

Expand All @@ -315,12 +315,12 @@ Use the `up` prop on `<Dropdown>` for the menu to appear **above** the `<Dropdow
props={{
active: {
description: "set the item as active",
typeName: "boolean"
typeName: "boolean",
},
onClick: {
description: "callback when the component is clicked",
typeName: "(event: React.MouseEvent) => void"
}
typeName: "(event: React.MouseEvent) => void",
},
}}
/>

Expand All @@ -335,11 +335,11 @@ Use the `up` prop on `<Dropdown>` for the menu to appear **above** the `<Dropdow
props={{
active: {
description: "set the item as active",
typeName: "boolean"
typeName: "boolean",
},
onClick: {
description: "callback when the component is clicked",
typeName: "(event: React.MouseEvent) => void"
}
typeName: "(event: React.MouseEvent) => void",
},
}}
/>
16 changes: 8 additions & 8 deletions src/components/level/__docs__/level.docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Playground } from "docz";

import {
ForwardRefAsExoticComponentDoc,
mapEnumerable
mapEnumerable,
} from "src/__docs__/components";
import { DEFAULTS } from "src/base/helpers/variables";
import { Generic } from "src/base";
Expand All @@ -19,7 +19,7 @@ import {
Field,
Heading,
Input,
Title
Title,
} from "src/elements";
import { Level } from "../level";
import { LEVEL_ITEM_DEFAULTS } from "../level-item";
Expand Down Expand Up @@ -223,9 +223,9 @@ For example, for a responsive size greater than **mobile** (up to 768px), these
breakpoint: {
description:
'the responsive size at which the level is vertical (without overriding Bulma SASS, only "mobile" is supported)',
typeName: "string",
typeTip: mapEnumerable(DEFAULTS.breakpoints)
}
typeName: "string (literal)",
typeTip: mapEnumerable(DEFAULTS.breakpoints),
},
}}
/>

Expand All @@ -236,8 +236,8 @@ For example, for a responsive size greater than **mobile** (up to 768px), these
props={{
align: {
description: "the side of the level is placed",
typeName: "string",
typeTip: mapEnumerable(LEVEL_ITEM_DEFAULTS.alignments)
}
typeName: "string (literal)",
typeTip: mapEnumerable(LEVEL_ITEM_DEFAULTS.alignments),
},
}}
/>
10 changes: 5 additions & 5 deletions src/components/media/__docs__/media.docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Playground } from "docz";

import {
ForwardRefAsExoticComponentDoc,
mapEnumerable
mapEnumerable,
} from "src/__docs__/components";
import { DEFAULTS } from "src/base/helpers/variables";
import { Level } from "src/components";
Expand All @@ -24,7 +24,7 @@ import {
Icon,
Image,
Label,
Textarea
Textarea,
} from "src/elements";
import { Media } from "../media";
import { MEDIA_ITEM_DEFAULTS } from "../media-item";
Expand Down Expand Up @@ -256,8 +256,8 @@ You can nest `<Media>` objects up to 3 levels deep (without extending Bulma's SA
props={{
align: {
description: "change the position of the item inside the media container",
typeName: "string",
typeTip: mapEnumerable(MEDIA_ITEM_DEFAULTS.alignments)
}
typeName: "string (literal)",
typeTip: mapEnumerable(MEDIA_ITEM_DEFAULTS.alignments),
},
}}
/>
12 changes: 6 additions & 6 deletions src/components/message/__docs__/message.docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Playground } from "docz";
import {
ForwardRefAsExoticComponentDoc,
mapEnumerable,
OptionBlock
OptionBlock,
} from "src/__docs__/components";
import { DEFAULTS } from "src/base/helpers/variables";
import { Delete } from "src/elements";
Expand Down Expand Up @@ -134,14 +134,14 @@ Use the `size` prop on `<Message>` to set the size.
props={{
color: {
description: "set the message's color",
typeName: "string",
typeTip: mapEnumerable(DEFAULTS.colors)
typeName: "string (literal)",
typeTip: mapEnumerable(DEFAULTS.colors),
},
size: {
description: "set the message's size",
typeName: "string",
typeTip: mapEnumerable(MESSAGE_DEFAULTS.sizes)
}
typeName: "string (literal)",
typeTip: mapEnumerable(MESSAGE_DEFAULTS.sizes),
},
}}
/>

Expand Down
8 changes: 4 additions & 4 deletions src/components/navbar/__docs__/navbar.docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ Use the `color` prop of the `<Navbar>` to change the color.
},
color: {
description: "set the navbar's color",
typeName: "string",
typeName: "string (literal)",
typeTip: mapEnumerable(DEFAULTS.colors),
},
document: {
Expand All @@ -858,7 +858,7 @@ Use the `color` prop of the `<Navbar>` to change the color.
},
fixed: {
description: "fix the position to the top or bottom",
typeName: "string",
typeName: "string (literal)",
typeTip: mapEnumerable(NAVBAR_DEFAULTS.fixedAlignments),
},
managed: {
Expand Down Expand Up @@ -902,7 +902,7 @@ Use the `color` prop of the `<Navbar>` to change the color.
props={{
align: {
description: "align the menu to the left or right",
typeName: "string",
typeName: "string (literal)",
typeTip: mapEnumerable(NAVBAR_DROPDOWN_DEFAULTS.alignments),
},
boxed: {
Expand Down Expand Up @@ -990,7 +990,7 @@ Use the `color` prop of the `<Navbar>` to change the color.
description:
"set the content in the left or right side of the dropdown menu",
required: true,
typeName: "string",
typeName: "string (literal)",
typeTip: mapEnumerable(NAVBAR_SEGMENT_DEFAULTS.alignments),
},
}}
Expand Down
6 changes: 3 additions & 3 deletions src/components/pagination/__docs__/pagination.docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Use the `size` prop on `<Pagination>` to change the size.
props={{
align: {
description: "change the pagination's alignment of pagination items",
typeName: "string",
typeName: "string (literal)",
typeTip: mapEnumerable(PAGINATION_DEFAULTS.alignments),
},
rounded: {
Expand All @@ -183,7 +183,7 @@ Use the `size` prop on `<Pagination>` to change the size.
},
size: {
description: "change the pagination's size",
typeName: "string",
typeName: "string (literal)",
typeTip: mapEnumerable(PAGINATION_DEFAULTS.sizes),
},
}}
Expand Down Expand Up @@ -226,7 +226,7 @@ Use the `size` prop on `<Pagination>` to change the size.
description:
"set the step as next or previous (positioning changes with pagination's align prop",
required: true,
typeName: "string",
typeName: "string (literal)",
typeTip: mapEnumerable(PAGINATION_STEP_DEFAULTS.alignments),
},
}}
Expand Down
Loading

0 comments on commit 3129890

Please sign in to comment.