Skip to content

Commit

Permalink
feat(types): types for Breadcrumbs components
Browse files Browse the repository at this point in the history
  • Loading branch information
nolimits4web committed Apr 27, 2022
1 parent 58a62c4 commit 86cd6b8
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/build-svelte-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const addOnClick = [
'ListButton',
'NavbarBackLink',
'SegmentedButton',
'BreadcrumbsCollapsed',
'BreadcrumbsItem',
];

const addOnClickProp = (componentName) => {
Expand Down
20 changes: 20 additions & 0 deletions src/types/Breadcrumbs.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
interface Props {
/**
* Component's HTML Element
*
* @default 'div'
*/
component?: string;
/**
* Font size in iOS theme
*
* @default 'text-[17px]'
*/
fontSizeIos?: string;
/**
* Font size in Material theme
*
* @default 'text-[16px]'
*/
fontSizeMaterial?: string;
}
25 changes: 25 additions & 0 deletions src/types/BreadcrumbsCollapsed.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
interface Props {
/**
* Component's HTML Element
*
* @default 'div'
*/
component?: string;
/**
* Object with Tailwind CSS colors classes
* */
colors?: {
/**
* Collapsed bg color
*
* @default 'bg-black bg-opacity-15 dark:bg-white dark:bg-opacity-15'
*/
bg?: string;
/**
* Collapsed "dot" bg color
*
* @default 'bg-black dark:bg-white'
*/
dotBg?: string;
};
}
32 changes: 32 additions & 0 deletions src/types/BreadcrumbsItem.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
interface Props {
/**
* Component's HTML Element
*
* @default 'div'
*/
component?: string;
/**
* Marks breadcrumb item as active/current (usually last item in breadcrumbs)
*
* @default false
*/
active?: boolean;
/**
* Object with Tailwind CSS colors classes
* */
colors?: {
/**
* Breadcrumbs item text color
*
* @default 'text-black text-opacity-55 dark:text-white dark:text-opacity-55'
*/
text?: string;

/**
* Breadcrumbs active item text color
*
* @default 'text-black dark:text-white'
*/
textActive?: string;
};
}
8 changes: 8 additions & 0 deletions src/types/BreadcrumbsSeparator.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
interface Props {
/**
* Component's HTML Element
*
* @default 'div'
*/
component?: string;
}

0 comments on commit 86cd6b8

Please sign in to comment.