Skip to content

Commit

Permalink
Omit explicit "from carbon-icons-svelte" from icon prop definitions (
Browse files Browse the repository at this point in the history
…carbon-design-system#866)

* fix(types): update description for icon props carbon-design-system#865

* docs(component-api): remove hardcoded Carbon Svelte icon description
  • Loading branch information
metonym authored Oct 20, 2021
1 parent 0509e8f commit 7b65a15
Show file tree
Hide file tree
Showing 36 changed files with 120 additions and 131 deletions.
128 changes: 64 additions & 64 deletions COMPONENT_INDEX.md

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions docs/src/COMPONENT_API.json
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@
{
"name": "icon",
"kind": "let",
"description": "Specify the icon from `carbon-icons-svelte` to render",
"description": "Specify the icon to render",
"type": "typeof import(\"svelte\").SvelteComponent",
"isFunction": false,
"isFunctionDeclaration": false,
Expand Down Expand Up @@ -1942,7 +1942,7 @@
{
"name": "icon",
"kind": "let",
"description": "Specify the icon from `carbon-icons-svelte` to render\nIcon is rendered to the left of the label text",
"description": "Specify the icon to render\nIcon is rendered to the left of the label text",
"type": "typeof import(\"svelte\").SvelteComponent",
"isFunction": false,
"isFunctionDeclaration": false,
Expand Down Expand Up @@ -4339,7 +4339,7 @@
{
"name": "iconMenu",
"kind": "let",
"description": "Specify the icon from `carbon-icons-svelte` to render for the closed state\nDefaults to `Menu20`",
"description": "Specify the icon to render for the closed state\nDefaults to `Menu20`",
"type": "typeof import(\"svelte\").SvelteComponent",
"isFunction": false,
"isFunctionDeclaration": false,
Expand All @@ -4349,7 +4349,7 @@
{
"name": "iconClose",
"kind": "let",
"description": "Specify the icon from `carbon-icons-svelte` to render for the opened state\nDefaults to `Close20`",
"description": "Specify the icon to render for the opened state\nDefaults to `Close20`",
"type": "typeof import(\"svelte\").SvelteComponent",
"isFunction": false,
"isFunctionDeclaration": false,
Expand Down Expand Up @@ -4389,7 +4389,7 @@
{
"name": "icon",
"kind": "let",
"description": "Specify the icon from `carbon-icons-svelte` to render",
"description": "Specify the icon to render",
"type": "typeof import(\"svelte\").SvelteComponent",
"isFunction": false,
"isFunctionDeclaration": false,
Expand All @@ -4399,7 +4399,7 @@
{
"name": "closeIcon",
"kind": "let",
"description": "Specify the close icon from `carbon-icons-svelte` to render",
"description": "Specify the icon to render when the action panel is open",
"type": "typeof import(\"svelte\").SvelteComponent",
"isFunction": false,
"isFunctionDeclaration": false,
Expand Down Expand Up @@ -4489,7 +4489,7 @@
{
"name": "icon",
"kind": "let",
"description": "Specify the icon from `carbon-icons-svelte` to render",
"description": "Specify the icon to render",
"type": "typeof import(\"svelte\").SvelteComponent",
"isFunction": false,
"isFunctionDeclaration": false,
Expand Down Expand Up @@ -4887,7 +4887,7 @@
{
"name": "render",
"kind": "let",
"description": "Specify the icon from `carbon-icons-svelte` to render",
"description": "Specify the icon to render",
"type": "typeof import(\"svelte\").SvelteComponent",
"isFunction": false,
"isFunctionDeclaration": false,
Expand Down Expand Up @@ -5260,7 +5260,7 @@
{
"name": "icon",
"kind": "let",
"description": "Specify the icon from `carbon-icons-svelte` to render\n`inline` must be `false`",
"description": "Specify the icon to render\n`inline` must be `false`",
"type": "typeof import(\"svelte\").SvelteComponent",
"isFunction": false,
"isFunctionDeclaration": false,
Expand Down Expand Up @@ -6737,7 +6737,7 @@
{
"name": "icon",
"kind": "let",
"description": "Specify the icon from `carbon-icons-svelte` to render",
"description": "Specify the icon to render",
"type": "typeof import(\"svelte\").SvelteComponent",
"isFunction": false,
"isFunctionDeclaration": false,
Expand Down Expand Up @@ -7321,7 +7321,7 @@
{
"name": "icon",
"kind": "let",
"description": "Specify the icon from `carbon-icons-svelte` to render",
"description": "Specify the icon to render",
"type": "typeof import(\"svelte\").SvelteComponent",
"isFunction": false,
"isFunctionDeclaration": false,
Expand Down Expand Up @@ -9093,7 +9093,7 @@
{
"name": "icon",
"kind": "let",
"description": "Specify the icon from `carbon-icons-svelte` to render",
"description": "Specify the icon to render",
"type": "typeof import(\"svelte\").SvelteComponent",
"isFunction": false,
"isFunctionDeclaration": false,
Expand Down Expand Up @@ -9753,7 +9753,7 @@
{
"name": "icon",
"kind": "let",
"description": "Specify the icon from `carbon-icons-svelte` to render",
"description": "Specify the icon to render",
"type": "typeof import(\"svelte\").SvelteComponent",
"isFunction": false,
"isFunctionDeclaration": false,
Expand Down Expand Up @@ -9805,7 +9805,7 @@
{
"name": "icon",
"kind": "let",
"description": "Specify the icon from `carbon-icons-svelte` to render",
"description": "Specify the icon to render",
"type": "typeof import(\"svelte\").SvelteComponent",
"isFunction": false,
"isFunctionDeclaration": false,
Expand Down Expand Up @@ -11139,7 +11139,7 @@
{
"name": "icon",
"kind": "let",
"description": "Specify the icon from `carbon-icons-svelte` to render",
"description": "Specify the icon to render",
"type": "typeof import(\"svelte\").SvelteComponent",
"isFunction": false,
"isFunctionDeclaration": false,
Expand Down Expand Up @@ -12788,7 +12788,7 @@
{
"name": "icon",
"kind": "let",
"description": "Specify the icon from `carbon-icons-svelte` to render for the tooltip button\nIcon size must be 16px (e.g., `Add16`, `Task16`)",
"description": "Specify the icon to render for the tooltip button\nIcon size must be 16px (e.g., `Add16`, `Task16`)",
"type": "typeof import(\"svelte\").SvelteComponent",
"isFunction": false,
"isFunctionDeclaration": false,
Expand Down Expand Up @@ -13034,7 +13034,7 @@
{
"name": "icon",
"kind": "let",
"description": "Specify the icon from `carbon-icons-svelte` to render",
"description": "Specify the icon to render",
"type": "typeof import(\"svelte\").SvelteComponent",
"isFunction": false,
"isFunctionDeclaration": false,
Expand Down
13 changes: 1 addition & 12 deletions docs/src/components/ComponentApi.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,18 @@
};
import {
Link,
OutboundLink,
StructuredList,
StructuredListHead,
StructuredListRow,
StructuredListCell,
StructuredListBody,
TooltipDefinition,
UnorderedList,
ListItem,
Tag,
CodeSnippet,
} from "carbon-components-svelte";
import InlineSnippet from "./InlineSnippet.svelte";
import Launch16 from "carbon-icons-svelte/lib/Launch16";
const mdn_api = "https://developer.mozilla.org/en-US/docs/Web/API/";
const typeMap = {
Expand Down Expand Up @@ -85,15 +82,7 @@
class="cell"
style="z-index: {(prop.type || '').split(' | ').length - i}"
>
{#if type.startsWith("typeof")}
<TooltipDefinition
direction="top"
align="start"
tooltipText="{`From "carbon-icons-svelte"`}"
>
Carbon Svelte icon
</TooltipDefinition>
{:else if type.startsWith("HTML")}
{#if type.startsWith("HTML")}
<OutboundLink
href="{mdn_api}{type}"
style="white-space: nowrap"
Expand Down
2 changes: 1 addition & 1 deletion src/Button/Button.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
export let hasIconOnly = false;
/**
* Specify the icon from `carbon-icons-svelte` to render
* Specify the icon to render
* @type {typeof import("svelte").SvelteComponent}
*/
export let icon = undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/ContextMenu/ContextMenuOption.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
export let indented = false;
/**
* Specify the icon from `carbon-icons-svelte` to render
* Specify the icon to render
* Icon is rendered to the left of the label text
* @type {typeof import("svelte").SvelteComponent}
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Icon/Icon.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
/**
* Specify the icon from `carbon-icons-svelte` to render
* Specify the icon to render
* @type {typeof import("svelte").SvelteComponent}
*/
export let render = undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/Link/Link.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
export let inline = false;
/**
* Specify the icon from `carbon-icons-svelte` to render
* Specify the icon to render
* `inline` must be `false`
* @type {typeof import("svelte").SvelteComponent}
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Notification/NotificationButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
export let notificationType = "toast";
/**
* Specify the icon from `carbon-icons-svelte` to render
* Specify the icon to render
* @type {typeof import("svelte").SvelteComponent}
*/
export let icon = Close20;
Expand Down
2 changes: 1 addition & 1 deletion src/OverflowMenu/OverflowMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
export let menuOptionsClass = undefined;
/**
* Specify the icon from `carbon-icons-svelte` to render
* Specify the icon to render
* @type {typeof import("svelte").SvelteComponent}
*/
export let icon = OverflowMenuVertical16;
Expand Down
2 changes: 1 addition & 1 deletion src/Search/Search.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
export let labelText = "";
/**
* Specify the icon from `carbon-icons-svelte` to render
* Specify the icon to render
* @type {typeof import("svelte").SvelteComponent}
*/
export let icon = Search16;
Expand Down
2 changes: 1 addition & 1 deletion src/Tag/Tag.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
export let title = "Clear filter";
/**
* Specify the icon from `carbon-icons-svelte` to render
* Specify the icon to render
* @type {typeof import("svelte").SvelteComponent}
*/
export let icon = undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/Tooltip/Tooltip.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
export let hideIcon = false;
/**
* Specify the icon from `carbon-icons-svelte` to render for the tooltip button
* Specify the icon to render for the tooltip button
* Icon size must be 16px (e.g., `Add16`, `Task16`)
* @type {typeof import("svelte").SvelteComponent}
*/
Expand Down
2 changes: 1 addition & 1 deletion src/TooltipIcon/TooltipIcon.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
export let tooltipText = "";
/**
* Specify the icon from `carbon-icons-svelte` to render
* Specify the icon to render
* @type {typeof import("svelte").SvelteComponent}
*/
export let icon = undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/TreeView/TreeViewNode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
export let disabled = false;
/**
* Specify the icon from `carbon-icons-svelte` to render
* Specify the icon to render
* @type {typeof import("svelte").SvelteComponent}
*/
export let icon = undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/TreeView/TreeViewNodeList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
export let disabled = false;
/**
* Specify the icon from `carbon-icons-svelte` to render
* Specify the icon to render
* @type {typeof import("svelte").SvelteComponent}
*/
export let icon = undefined;
Expand Down
4 changes: 2 additions & 2 deletions src/UIShell/GlobalHeader/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@
export let ref = null;
/**
* Specify the icon from `carbon-icons-svelte` to render for the closed state
* Specify the icon to render for the closed state
* Defaults to `Menu20`
* @type {typeof import("svelte").SvelteComponent}
*/
export let iconMenu = Menu20;
/**
* Specify the icon from `carbon-icons-svelte` to render for the opened state
* Specify the icon to render for the opened state
* Defaults to `Close20`
* @type {typeof import("svelte").SvelteComponent}
*/
Expand Down
4 changes: 2 additions & 2 deletions src/UIShell/GlobalHeader/HeaderAction.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
export let isOpen = false;
/**
* Specify the icon from `carbon-icons-svelte` to render
* Specify the icon to render
* @type {typeof import("svelte").SvelteComponent}
*/
export let icon = AppSwitcher20;
/**
* Specify the close icon from `carbon-icons-svelte` to render
* Specify the icon to render when the action panel is open
* @type {typeof import("svelte").SvelteComponent}
*/
export let closeIcon = Close20;
Expand Down
2 changes: 1 addition & 1 deletion src/UIShell/GlobalHeader/HeaderActionLink.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
export let href = undefined;
/**
* Specify the icon from `carbon-icons-svelte` to render
* Specify the icon to render
* @type {typeof import("svelte").SvelteComponent}
*/
export let icon = undefined;
Expand Down
4 changes: 2 additions & 2 deletions src/UIShell/SideNav/HamburgerMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
export let isOpen = false;
/**
* Specify the icon from `carbon-icons-svelte` to render for the closed state
* Specify the icon to render for the closed state
* Defaults to `Menu20`
* @type {typeof import("svelte").SvelteComponent}
*/
export let iconMenu = Menu20;
/**
* Specify the icon from `carbon-icons-svelte` to render for the opened state
* Specify the icon to render for the opened state
* Defaults to `Close20`
* @type {typeof import("svelte").SvelteComponent}
*/
Expand Down
2 changes: 1 addition & 1 deletion src/UIShell/SideNav/SideNavLink.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
export let text = undefined;
/**
* Specify the icon from `carbon-icons-svelte` to render
* Specify the icon to render
* @type {typeof import("svelte").SvelteComponent}
*/
export let icon = undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/UIShell/SideNav/SideNavMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
export let text = undefined;
/**
* Specify the icon from `carbon-icons-svelte` to render
* Specify the icon to render
* @type {typeof import("svelte").SvelteComponent}
*/
export let icon = undefined;
Expand Down
2 changes: 1 addition & 1 deletion types/Button/Button.svelte.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export interface ButtonProps
hasIconOnly?: boolean;

/**
* Specify the icon from `carbon-icons-svelte` to render
* Specify the icon to render
*/
icon?: typeof import("svelte").SvelteComponent;

Expand Down
2 changes: 1 addition & 1 deletion types/ContextMenu/ContextMenuOption.svelte.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface ContextMenuOptionProps
indented?: boolean;

/**
* Specify the icon from `carbon-icons-svelte` to render
* Specify the icon to render
* Icon is rendered to the left of the label text
*/
icon?: typeof import("svelte").SvelteComponent;
Expand Down
Loading

0 comments on commit 7b65a15

Please sign in to comment.