diff --git a/src/base/helpers/badge.ts b/src/base/helpers/badge.ts index b352c22a..00ac5373 100644 --- a/src/base/helpers/badge.ts +++ b/src/base/helpers/badge.ts @@ -8,13 +8,13 @@ import { } from "./factory"; import { DEFAULTS, Variables } from "./variables"; -export type BadgeHelpersProps = Partial<{ - badge: number | string; - badgeColor: Variables["colors"]; - badgeOutlined: boolean; - badgeRounded: boolean; - badgeSize: (typeof DEFAULTS["badgeSizes"])[number]; -}>; +export type BadgeHelpersProps = { + badge?: number | string; + badgeColor?: Variables["colors"]; + badgeOutlined?: boolean; + badgeRounded?: boolean; + badgeSize?: (typeof DEFAULTS["badgeSizes"])[number]; +}; // Factories export const makePropTypes = makePropTypesFactory(vars => ({ diff --git a/src/base/helpers/float.ts b/src/base/helpers/float.ts index f474316b..0ebb7cf8 100644 --- a/src/base/helpers/float.ts +++ b/src/base/helpers/float.ts @@ -8,12 +8,12 @@ import { } from "./factory"; import { Variables } from "./variables"; -export type FloatHelpersProps = Partial<{ +export type FloatHelpersProps = { /** Fixes an element's floating children */ - clearfix: boolean; + clearfix?: boolean; /** Moves an element to the left or right */ - pull: Variables["floatPulledAlignments"]; -}>; + pull?: Variables["floatPulledAlignments"]; +}; // Factories export const makePropTypes = makePropTypesFactory(vars => ({ diff --git a/src/base/helpers/other.ts b/src/base/helpers/other.ts index 6b62e9c0..0d7f277b 100644 --- a/src/base/helpers/other.ts +++ b/src/base/helpers/other.ts @@ -7,20 +7,20 @@ import { TransformFunction, } from "./factory"; -export type OtherHelpersProps = Partial<{ +export type OtherHelpersProps = { /** Removes any margin */ - marginless: boolean; + marginless?: boolean; /** Removes any padding */ - paddingless: boolean; + paddingless?: boolean; /** Removes any radius */ - radiusless: boolean; - /** Applies position: relative to the element */ - relative: boolean; + radiusless?: boolean; + /** Applies position?: relative to the element */ + relative?: boolean; /** Removes any shadow */ - shadowless: boolean; + shadowless?: boolean; /** Prevents the text from being selectable */ - unselectable: boolean; -}>; + unselectable?: boolean; +}; // Factories export const makePropTypes = makePropTypesFactory(vars => ({ diff --git a/src/base/helpers/overflow.ts b/src/base/helpers/overflow.ts index ceea169d..356504c5 100644 --- a/src/base/helpers/overflow.ts +++ b/src/base/helpers/overflow.ts @@ -7,10 +7,10 @@ import { TransformFunction, } from "./factory"; -export type OverflowHelpersProps = Partial<{ +export type OverflowHelpersProps = { /** Adds overflow hidden */ - clipped: boolean; -}>; + clipped?: boolean; +}; // Factories export const makePropTypes = makePropTypesFactory(vars => ({ diff --git a/src/base/helpers/overlay.ts b/src/base/helpers/overlay.ts index 6c8fed69..aca70138 100644 --- a/src/base/helpers/overlay.ts +++ b/src/base/helpers/overlay.ts @@ -7,10 +7,10 @@ import { TransformFunction, } from "./factory"; -export type OverlayHelpersProps = Partial<{ +export type OverlayHelpersProps = { /** Completely covers the first positioned parent */ - overlay: boolean; -}>; + overlay?: boolean; +}; // Factories export const makePropTypes = makePropTypesFactory(vars => ({ diff --git a/src/base/helpers/responsive.ts b/src/base/helpers/responsive.ts index 160a5142..fc5ba058 100644 --- a/src/base/helpers/responsive.ts +++ b/src/base/helpers/responsive.ts @@ -8,53 +8,51 @@ import { } from "./factory"; import { Variables } from "./variables"; -export type LimitedResponsiveBreakpointProps = Partial<{ - display: { +export type LimitedResponsiveBreakpointProps = { + display?: { value: Variables["displays"]; }; - hide: { + hide?: { value: boolean; }; - textAlign: { + textAlign?: { value: Variables["textAlignments"]; }; - textSize: { + textSize?: { value: Variables["textSizes"]; }; -}>; +}; -export type ResponsiveBreakpointProps = Partial<{ - display: { +export type ResponsiveBreakpointProps = { + display?: { only?: boolean; value: Variables["displays"]; }; - hide: { + hide?: { only?: boolean; value: boolean; }; - textAlign: { + textAlign?: { only?: boolean; value: Variables["textAlignments"]; }; - textSize: { + textSize?: { only?: boolean; value: Variables["textSizes"]; }; -}>; +}; -export type ResponsiveHelpersProps = Partial<{ - responsive: Partial< +export type ResponsiveHelpersProps = { + responsive?: { + [B in Variables["breakpointsLimited"]]?: LimitedResponsiveBreakpointProps; + } & { - [B in Variables["breakpointsLimited"]]: LimitedResponsiveBreakpointProps; - } & - { - [B in Exclude< - Variables["breakpoints"], - Variables["breakpointsLimited"] - >]: ResponsiveBreakpointProps; - } - >; -}>; + [B in Exclude< + Variables["breakpoints"], + Variables["breakpointsLimited"] + >]?: ResponsiveBreakpointProps; + }; +}; export const makeResponsiveBreakpointPropTypes = makePropTypesFactory(vars => ({ display: PropTypes.shape({ diff --git a/src/base/helpers/tooltip.ts b/src/base/helpers/tooltip.ts index 8d708388..9cef6e37 100644 --- a/src/base/helpers/tooltip.ts +++ b/src/base/helpers/tooltip.ts @@ -8,16 +8,16 @@ import { } from "./factory"; import { DEFAULTS, Variables } from "./variables"; -export type TooltipHelpersProps = Partial<{ - tooltip: number | string; - tooltipActive: boolean; - tooltipColor: Variables["colors"]; - tooltipMultiline: boolean; - tooltipPosition: (typeof DEFAULTS["tooltipPositions"])[number]; - tooltipResponsive: { +export type TooltipHelpersProps = { + tooltip?: number | string; + tooltipActive?: boolean; + tooltipColor?: Variables["colors"]; + tooltipMultiline?: boolean; + tooltipPosition?: (typeof DEFAULTS["tooltipPositions"])[number]; + tooltipResponsive?: { [K in Variables["breakpoints"]]?: (typeof DEFAULTS["tooltipPositions"])[number]; }; -}>; +}; // Factories export const makePropTypes = makePropTypesFactory(vars => ({ diff --git a/src/base/helpers/typography.ts b/src/base/helpers/typography.ts index 3a733e23..d5516970 100644 --- a/src/base/helpers/typography.ts +++ b/src/base/helpers/typography.ts @@ -8,15 +8,15 @@ import { } from "./factory"; import { Variables } from "./variables"; -export type TypographyHelpersProps = Partial<{ - backgroundColor: Variables["colors"] | Variables["shades"]; - italic: boolean; - textAlign: Variables["textAlignments"]; - textColor: Variables["colors"] | Variables["shades"]; - textSize: Variables["textSizes"]; - textTransform: Variables["textTransforms"]; - textWeight: Variables["textWeights"]; -}>; +export type TypographyHelpersProps = { + backgroundColor?: Variables["colors"] | Variables["shades"]; + italic?: boolean; + textAlign?: Variables["textAlignments"]; + textColor?: Variables["colors"] | Variables["shades"]; + textSize?: Variables["textSizes"]; + textTransform?: Variables["textTransforms"]; + textWeight?: Variables["textWeights"]; +}; // Factories export const makePropTypes = makePropTypesFactory(vars => ({ diff --git a/src/base/helpers/visibility.ts b/src/base/helpers/visibility.ts index abdbfb92..0c7be628 100644 --- a/src/base/helpers/visibility.ts +++ b/src/base/helpers/visibility.ts @@ -7,17 +7,17 @@ import { TransformFunction, } from "./factory"; -export type VisibilityHelpersProps = Partial<{ +export type VisibilityHelpersProps = { /** Hides an element (unclear on where this is documented in Bulma) */ - hidden: boolean; + hidden?: boolean; /** Adds visibility hidden */ - invisible: boolean; + invisible?: boolean; /** * Hide elements visually but keep the element available to be announced by a * screen reader */ - srOnly: boolean; -}>; + srOnly?: boolean; +}; // Factories export const makePropTypes = makePropTypesFactory(vars => ({ diff --git a/src/components/breadcrumb/breadcrumb.tsx b/src/components/breadcrumb/breadcrumb.tsx index 11ce1309..050fcbac 100644 --- a/src/components/breadcrumb/breadcrumb.tsx +++ b/src/components/breadcrumb/breadcrumb.tsx @@ -26,11 +26,11 @@ export type BreadcrumbVariables = Prefer< BreadcrumbVariablesDefaults >; -export type BreadcrumbModifierProps = Partial<{ - align: BreadcrumbVariables["alignments"]; - separator: BreadcrumbVariables["separators"]; - size: BreadcrumbVariables["sizes"]; -}>; +export type BreadcrumbModifierProps = { + align?: BreadcrumbVariables["alignments"]; + separator?: BreadcrumbVariables["separators"]; + size?: BreadcrumbVariables["sizes"]; +}; export type BreadcrumbProps = HelpersProps & BreadcrumbModifierProps; diff --git a/src/components/card/card-header-title.tsx b/src/components/card/card-header-title.tsx index 548ccdc2..00aa3247 100644 --- a/src/components/card/card-header-title.tsx +++ b/src/components/card/card-header-title.tsx @@ -21,9 +21,9 @@ export type CardHeaderTitleVariables = Prefer< CardHeaderTitleVariablesDefaults >; -export type CardHeaderTitleModifierProps = Partial<{ - align: CardHeaderTitleVariables["alignments"]; -}>; +export type CardHeaderTitleModifierProps = { + align?: CardHeaderTitleVariables["alignments"]; +}; export type CardHeaderTitleProps = HelpersProps & CardHeaderTitleModifierProps; diff --git a/src/components/dropdown/dropdown-container.tsx b/src/components/dropdown/dropdown-container.tsx index bb84c91e..91ba51a7 100644 --- a/src/components/dropdown/dropdown-container.tsx +++ b/src/components/dropdown/dropdown-container.tsx @@ -22,15 +22,15 @@ export type DropdownVariables = Prefer< DropdownVariablesDefaults >; -export type DropdownContainerModifierProps = Partial<{ - active: boolean; - align: DropdownVariables["alignments"]; - as: React.ReactType; // tslint:disable-line:no-reserved-keywords - hoverable: boolean; - innerRef: React.Ref; - managed: boolean; - up: boolean; -}>; +export type DropdownContainerModifierProps = { + active?: boolean; + align?: DropdownVariables["alignments"]; + as?: React.ReactType; // tslint:disable-line:no-reserved-keywords + hoverable?: boolean; + innerRef?: React.Ref; + managed?: boolean; + up?: boolean; +}; export type DropdownContainerProps = HelpersProps & DropdownContainerModifierProps; diff --git a/src/components/dropdown/dropdown-item.tsx b/src/components/dropdown/dropdown-item.tsx index 3d847fe0..22d37f5d 100644 --- a/src/components/dropdown/dropdown-item.tsx +++ b/src/components/dropdown/dropdown-item.tsx @@ -6,10 +6,10 @@ import { forwardRefAs, Generic } from "../../base"; import { HelpersProps } from "../../base/helpers"; import { DropdownContext, DropdownContextValue } from "./dropdown-context"; -export type DropdownItemModifierProps = Partial<{ - active: boolean; - onClick: React.MouseEventHandler; -}>; +export type DropdownItemModifierProps = { + active?: boolean; + onClick?: React.MouseEventHandler; +}; export type DropdownItemProps = HelpersProps & DropdownItemModifierProps; diff --git a/src/components/dropdown/dropdown-trigger.tsx b/src/components/dropdown/dropdown-trigger.tsx index de517da7..9d292c8f 100644 --- a/src/components/dropdown/dropdown-trigger.tsx +++ b/src/components/dropdown/dropdown-trigger.tsx @@ -6,9 +6,9 @@ import { forwardRefAs, Generic } from "../../base"; import { HelpersProps } from "../../base/helpers"; import { DropdownContext, DropdownContextValue } from "./dropdown-context"; -export type DropdownTriggerModifierProps = Partial<{ - onClick: React.MouseEventHandler; -}>; +export type DropdownTriggerModifierProps = { + onClick?: React.MouseEventHandler; +}; export type DropdownTriggerProps = HelpersProps & DropdownTriggerModifierProps; diff --git a/src/components/level/level-item.tsx b/src/components/level/level-item.tsx index 8483764b..7932988d 100644 --- a/src/components/level/level-item.tsx +++ b/src/components/level/level-item.tsx @@ -21,9 +21,9 @@ export type LevelItemVariables = Prefer< LevelItemVariablesDefaults >; -export type LevelItemModifierProps = Partial<{ - align: LevelItemVariables["alignments"]; -}>; +export type LevelItemModifierProps = { + align?: LevelItemVariables["alignments"]; +}; export type LevelItemProps = HelpersProps & LevelItemModifierProps; diff --git a/src/components/level/level.tsx b/src/components/level/level.tsx index f6d184e3..f7318a21 100644 --- a/src/components/level/level.tsx +++ b/src/components/level/level.tsx @@ -7,9 +7,9 @@ import { HelpersProps } from "../../base/helpers"; import { Variables } from "../../base/helpers/variables"; import { LevelItem } from "./level-item"; -export type LevelModifierProps = Partial<{ - breakpoint: Variables["breakpoints"]; -}>; +export type LevelModifierProps = { + breakpoint?: Variables["breakpoints"]; +}; export type LevelProps = HelpersProps & LevelModifierProps; diff --git a/src/components/list/list-item.tsx b/src/components/list/list-item.tsx index fa895d1b..1c3d8ec2 100644 --- a/src/components/list/list-item.tsx +++ b/src/components/list/list-item.tsx @@ -5,9 +5,9 @@ import React from "react"; import { forwardRefAs, Generic } from "../../base"; import { HelpersProps } from "../../base/helpers"; -export type ListItemModifierProps = Partial<{ - active: boolean; -}>; +export type ListItemModifierProps = { + active?: boolean; +}; export type ListItemProps = HelpersProps & ListItemModifierProps; diff --git a/src/components/media/media-item.tsx b/src/components/media/media-item.tsx index 4f2e3754..a4e684ed 100644 --- a/src/components/media/media-item.tsx +++ b/src/components/media/media-item.tsx @@ -21,9 +21,9 @@ export type MediaItemVariables = Prefer< MediaItemVariablesDefaults >; -export type MediaItemModifierProps = Partial<{ - align: MediaItemVariables["alignments"]; -}>; +export type MediaItemModifierProps = { + align?: MediaItemVariables["alignments"]; +}; export type MediaItemProps = HelpersProps & MediaItemModifierProps; diff --git a/src/components/menu/menu-list-item.tsx b/src/components/menu/menu-list-item.tsx index 63753dab..a232adaa 100644 --- a/src/components/menu/menu-list-item.tsx +++ b/src/components/menu/menu-list-item.tsx @@ -5,10 +5,10 @@ import React from "react"; import { forwardRefAs, Generic } from "../../base"; import { HelpersProps } from "../../base/helpers"; -export type MenuListItemModifierProps = Partial<{ - active: boolean; - menu: React.ReactNode; -}>; +export type MenuListItemModifierProps = { + active?: boolean; + menu?: React.ReactNode; +}; export type MenuListItemProps = HelpersProps & MenuListItemModifierProps; diff --git a/src/components/message/message.tsx b/src/components/message/message.tsx index ed68cd7e..64f504d2 100644 --- a/src/components/message/message.tsx +++ b/src/components/message/message.tsx @@ -24,10 +24,10 @@ export type MessageVariables = Prefer< MessageVariablesDefaults >; -export type MessageModifierProps = Partial<{ - color: Variables["colors"]; - size: MessageVariables["sizes"]; -}>; +export type MessageModifierProps = { + color?: Variables["colors"]; + size?: MessageVariables["sizes"]; +}; export type MessageProps = HelpersProps & MessageModifierProps; diff --git a/src/components/modal/modal-background.tsx b/src/components/modal/modal-background.tsx index 393f465c..77836969 100644 --- a/src/components/modal/modal-background.tsx +++ b/src/components/modal/modal-background.tsx @@ -6,9 +6,9 @@ import { forwardRefAs, Generic } from "../../base"; import { HelpersProps } from "../../base/helpers"; import { ModalContext, ModalContextValue } from "./modal-context"; -export type ModalBackgroundModifierProps = Partial<{ - onClick: React.MouseEventHandler; -}>; +export type ModalBackgroundModifierProps = { + onClick?: React.MouseEventHandler; +}; export type ModalBackgroundProps = HelpersProps & ModalBackgroundModifierProps; diff --git a/src/components/modal/modal-close.tsx b/src/components/modal/modal-close.tsx index 3ee342e4..6efd9de6 100644 --- a/src/components/modal/modal-close.tsx +++ b/src/components/modal/modal-close.tsx @@ -6,9 +6,9 @@ import { forwardRefAs, Generic } from "../../base"; import { HelpersProps } from "../../base/helpers"; import { ModalContext, ModalContextValue } from "./modal-context"; -export type ModalCloseModifierProps = Partial<{ - onClick: React.MouseEventHandler; -}>; +export type ModalCloseModifierProps = { + onClick?: React.MouseEventHandler; +}; export type ModalCloseProps = HelpersProps & ModalCloseModifierProps; diff --git a/src/components/modal/modal-container.tsx b/src/components/modal/modal-container.tsx index 39e77450..01a65bf3 100644 --- a/src/components/modal/modal-container.tsx +++ b/src/components/modal/modal-container.tsx @@ -5,18 +5,18 @@ import { canUseDOM } from "../../utils"; import { ModalContextValue } from "./modal-context"; import { ModalPortal } from "./modal-portal"; -export type ModalContainerProps = Partial<{ - active: boolean; - as: React.ReactType; // tslint:disable-line:no-reserved-keywords - children: React.ReactNode; - clipped: boolean; - closeOnBlur: ModalContextValue["closeOnBlur"]; - closeOnEsc: ModalContextValue["closeOnEsc"]; - containerClassName: string; - document: Document; - innerRef: React.Ref; - onClose(): void; -}>; +export type ModalContainerProps = { + active?: boolean; + as?: React.ReactType; // tslint:disable-line:no-reserved-keywords + children?: React.ReactNode; + clipped?: boolean; + closeOnBlur?: ModalContextValue["closeOnBlur"]; + closeOnEsc?: ModalContextValue["closeOnEsc"]; + containerClassName?: string; + document?: Document; + innerRef?: React.Ref; + onClose?: () => void; +}; export class ModalContainer extends React.PureComponent { public static displayName = "Modal.Container"; diff --git a/src/components/modal/modal-portal.tsx b/src/components/modal/modal-portal.tsx index 22cb4a89..81714ff0 100644 --- a/src/components/modal/modal-portal.tsx +++ b/src/components/modal/modal-portal.tsx @@ -4,15 +4,16 @@ import React from "react"; import { Generic } from "../../base"; import { initialValue, ModalContext, ModalContextValue } from "./modal-context"; -export type ModalPortalModifierProps = Partial<{ - as: React.ReactType; // tslint:disable-line:no-reserved-keywords - className: string; - clipped: boolean; - closeOnBlur: ModalContextValue["closeOnBlur"]; - closeOnEsc: ModalContextValue["closeOnEsc"]; - innerRef: React.Ref; - onClose: ModalContextValue["close"]; -}> & { document: Document }; +export type ModalPortalModifierProps = { + as?: React.ReactType; // tslint:disable-line:no-reserved-keywords + className?: string; + clipped?: boolean; + closeOnBlur?: ModalContextValue["closeOnBlur"]; + closeOnEsc?: ModalContextValue["closeOnEsc"]; + document: Document; + innerRef?: React.Ref; + onClose?: ModalContextValue["close"]; +}; export type ModalPortalProps = ModalPortalModifierProps; diff --git a/src/components/navbar/navbar-burger.tsx b/src/components/navbar/navbar-burger.tsx index 698bb081..241e1964 100644 --- a/src/components/navbar/navbar-burger.tsx +++ b/src/components/navbar/navbar-burger.tsx @@ -6,9 +6,9 @@ import { forwardRefAs, Generic } from "../../base"; import { HelpersProps } from "../../base/helpers"; import { NavbarContext, NavbarContextValue } from "./navbar-context"; -export type NavbarBurgerModifierProps = Partial<{ - onClick: React.MouseEventHandler; -}>; +export type NavbarBurgerModifierProps = { + onClick?: React.MouseEventHandler; +}; export type NavbarBurgerProps = HelpersProps & NavbarBurgerModifierProps; diff --git a/src/components/navbar/navbar-container.tsx b/src/components/navbar/navbar-container.tsx index 95e10968..b4ffd10c 100644 --- a/src/components/navbar/navbar-container.tsx +++ b/src/components/navbar/navbar-container.tsx @@ -23,17 +23,17 @@ export type NavbarVariables = Prefer< NavbarVariablesDefaults >; -export type NavbarContainerModifierProps = Partial<{ +export type NavbarContainerModifierProps = { /** * Determines whether the menu is displayed on mobile */ - active: boolean; - as: React.ReactType; // tslint:disable-line:no-reserved-keywords - color: Variables["colors"]; - document: Document; - fixed: NavbarVariables["fixedAlignments"]; - innerRef: React.Ref; - managed: boolean; - transparent: boolean; -}>; + active?: boolean; + as?: React.ReactType; // tslint:disable-line:no-reserved-keywords + color?: Variables["colors"]; + document?: Document; + fixed?: NavbarVariables["fixedAlignments"]; + innerRef?: React.Ref; + managed?: boolean; + transparent?: boolean; +}; export type NavbarContainerProps = HelpersProps & NavbarContainerModifierProps; diff --git a/src/components/navbar/navbar-dropdown.tsx b/src/components/navbar/navbar-dropdown.tsx index 64d74ae7..38a057fb 100644 --- a/src/components/navbar/navbar-dropdown.tsx +++ b/src/components/navbar/navbar-dropdown.tsx @@ -21,10 +21,10 @@ export type NavbarDropdownVariables = Prefer< NavbarDropdownVariablesDefaults >; -export type NavbarDropdownModifierProps = Partial<{ - align: NavbarDropdownVariables["alignments"]; - boxed: boolean; -}>; +export type NavbarDropdownModifierProps = { + align?: NavbarDropdownVariables["alignments"]; + boxed?: boolean; +}; export type NavbarDropdownProps = HelpersProps & NavbarDropdownModifierProps; diff --git a/src/components/navbar/navbar-item-container.tsx b/src/components/navbar/navbar-item-container.tsx index 9291ec8b..d2a9e48a 100644 --- a/src/components/navbar/navbar-item-container.tsx +++ b/src/components/navbar/navbar-item-container.tsx @@ -9,18 +9,18 @@ import { NavbarItemContextValue, } from "./navbar-item-context"; -export type NavbarItemContainerModifierProps = Partial<{ - active: boolean; - as: React.ReactType; // tslint:disable-line:no-reserved-keywords - dropdown: boolean; - expanded: boolean; - hoverable: boolean; - innerRef: React.Ref; - managed: boolean; - onClick: React.MouseEventHandler; - tab: boolean; - up: boolean; -}>; +export type NavbarItemContainerModifierProps = { + active?: boolean; + as?: React.ReactType; // tslint:disable-line:no-reserved-keywords + dropdown?: boolean; + expanded?: boolean; + hoverable?: boolean; + innerRef?: React.Ref; + managed?: boolean; + onClick?: React.MouseEventHandler; + tab?: boolean; + up?: boolean; +}; export type NavbarItemContainerProps = HelpersProps & NavbarItemContainerModifierProps; diff --git a/src/components/navbar/navbar-link.tsx b/src/components/navbar/navbar-link.tsx index ee293f7c..6486f1ce 100644 --- a/src/components/navbar/navbar-link.tsx +++ b/src/components/navbar/navbar-link.tsx @@ -9,10 +9,10 @@ import { NavbarItemContextValue, } from "./navbar-item-context"; -export type NavbarLinkModifierProps = Partial<{ - arrowless: boolean; - onClick: React.MouseEventHandler; -}>; +export type NavbarLinkModifierProps = { + arrowless?: boolean; + onClick?: React.MouseEventHandler; +}; export type NavbarLinkProps = HelpersProps & NavbarLinkModifierProps; diff --git a/src/components/pagination/pagination-link.tsx b/src/components/pagination/pagination-link.tsx index 92c5328f..98e14daa 100644 --- a/src/components/pagination/pagination-link.tsx +++ b/src/components/pagination/pagination-link.tsx @@ -5,9 +5,9 @@ import React from "react"; import { forwardRefAs, Generic } from "../../base"; import { HelpersProps } from "../../base/helpers"; -export type PaginationLinkModifiers = Partial<{ - current: boolean; -}>; +export type PaginationLinkModifiers = { + current?: boolean; +}; export type PaginationLinkProps = HelpersProps & PaginationLinkModifiers; diff --git a/src/components/pagination/pagination.tsx b/src/components/pagination/pagination.tsx index 4b3dc96f..6b6bdae9 100644 --- a/src/components/pagination/pagination.tsx +++ b/src/components/pagination/pagination.tsx @@ -27,11 +27,11 @@ export type PaginationVariables = Prefer< PaginationVariablesDefaults >; -export type PaginationModifiers = Partial<{ - align: PaginationVariables["alignments"]; - rounded: boolean; - size: PaginationVariables["sizes"]; -}>; +export type PaginationModifiers = { + align?: PaginationVariables["alignments"]; + rounded?: boolean; + size?: PaginationVariables["sizes"]; +}; export type PaginationProps = HelpersProps & PaginationModifiers; diff --git a/src/components/panel/panel-block.tsx b/src/components/panel/panel-block.tsx index 9e8e32cd..9a7e5ca2 100644 --- a/src/components/panel/panel-block.tsx +++ b/src/components/panel/panel-block.tsx @@ -5,9 +5,9 @@ import React from "react"; import { forwardRefAs, Generic } from "../../base"; import { HelpersProps } from "../../base/helpers"; -export type PanelBlockModifierProps = Partial<{ - active: boolean; -}>; +export type PanelBlockModifierProps = { + active?: boolean; +}; export type PanelBlockProps = HelpersProps & PanelBlockModifierProps; diff --git a/src/components/panel/panel-tab.tsx b/src/components/panel/panel-tab.tsx index 8411b3ce..84354766 100644 --- a/src/components/panel/panel-tab.tsx +++ b/src/components/panel/panel-tab.tsx @@ -6,9 +6,9 @@ import { forwardRefAs, Generic } from "../../base"; import { HelpersProps } from "../../base/helpers"; import { PanelTabGroup } from "./panel-tab-group"; -export type PanelTabModifierProps = Partial<{ - active: boolean; -}>; +export type PanelTabModifierProps = { + active?: boolean; +}; export type PanelTabProps = HelpersProps & PanelTabModifierProps; diff --git a/src/components/tab/tab-group.tsx b/src/components/tab/tab-group.tsx index e40a7ba3..492e055b 100644 --- a/src/components/tab/tab-group.tsx +++ b/src/components/tab/tab-group.tsx @@ -25,13 +25,13 @@ export type TabGroupVariables = Prefer< TabGroupVariablesDefaults >; -export type TabGroupModifierProps = Partial<{ - align: TabGroupVariables["alignments"]; - fullwidth: boolean; +export type TabGroupModifierProps = { + align?: TabGroupVariables["alignments"]; + fullwidth?: boolean; /** This is called style on Bulma documentation */ - kind: TabGroupVariables["kinds"]; - size: TabGroupVariables["sizes"]; -}>; + kind?: TabGroupVariables["kinds"]; + size?: TabGroupVariables["sizes"]; +}; export type TabGroupProps = HelpersProps & TabGroupModifierProps; diff --git a/src/components/tab/tab.tsx b/src/components/tab/tab.tsx index c1b98149..a525ba69 100644 --- a/src/components/tab/tab.tsx +++ b/src/components/tab/tab.tsx @@ -6,9 +6,9 @@ import { forwardRefAs, Generic } from "../../base"; import { HelpersProps } from "../../base/helpers"; import { TabGroup } from "./tab-group"; -export type TabModifierProps = Partial<{ - active: boolean; -}>; +export type TabModifierProps = { + active?: boolean; +}; export type TabProps = HelpersProps & TabModifierProps; diff --git a/src/elements/button/button-group.tsx b/src/elements/button/button-group.tsx index 195587fe..80f6f002 100644 --- a/src/elements/button/button-group.tsx +++ b/src/elements/button/button-group.tsx @@ -23,11 +23,11 @@ export type ButtonGroupVariables = Prefer< ButtonGroupVariablesDefaults >; -export type ButtonGroupModifierProps = Partial<{ - align: ButtonGroupVariables["alignments"]; - hasAddons: boolean; - size: ButtonGroupVariables["sizes"]; -}>; +export type ButtonGroupModifierProps = { + align?: ButtonGroupVariables["alignments"]; + hasAddons?: boolean; + size?: ButtonGroupVariables["sizes"]; +}; export type ButtonGroupProps = HelpersProps & ButtonGroupModifierProps; diff --git a/src/elements/button/button.tsx b/src/elements/button/button.tsx index a23c76fa..6a511161 100644 --- a/src/elements/button/button.tsx +++ b/src/elements/button/button.tsx @@ -25,18 +25,18 @@ export type ButtonVariables = Prefer< ButtonVariablesDefaults >; -export type ButtonModifierProps = Partial<{ - color: Variables["colors"]; - fullwidth: boolean; - inverted: boolean; - outlined: boolean; - rounded: boolean; - selected: boolean; - size: ButtonVariables["sizes"]; - state: ButtonVariables["states"]; - static: boolean; // tslint:disable-line:no-reserved-keywords - text: boolean; -}>; +export type ButtonModifierProps = { + color?: Variables["colors"]; + fullwidth?: boolean; + inverted?: boolean; + outlined?: boolean; + rounded?: boolean; + selected?: boolean; + size?: ButtonVariables["sizes"]; + state?: ButtonVariables["states"]; + static?: boolean; // tslint:disable-line:no-reserved-keywords + text?: boolean; +}; export type ButtonProps = HelpersProps & ButtonModifierProps; diff --git a/src/elements/container/container.tsx b/src/elements/container/container.tsx index f1c8348b..05293ac6 100644 --- a/src/elements/container/container.tsx +++ b/src/elements/container/container.tsx @@ -6,10 +6,10 @@ import { forwardRefAs, Generic } from "../../base"; import { HelpersProps } from "../../base/helpers"; import { Variables } from "../../base/helpers/variables"; -export type ContainerModifierProps = Partial<{ - breakpoint: Variables["breakpoints"]; - fluid: boolean; -}>; +export type ContainerModifierProps = { + breakpoint?: Variables["breakpoints"]; + fluid?: boolean; +}; export type ContainerProps = HelpersProps & ContainerModifierProps; diff --git a/src/elements/content/content-ordered-list.tsx b/src/elements/content/content-ordered-list.tsx index 413c2371..2725dcae 100644 --- a/src/elements/content/content-ordered-list.tsx +++ b/src/elements/content/content-ordered-list.tsx @@ -22,9 +22,9 @@ export type ContentOrderedListVariables = Prefer< ContentOrderedListVariablesDefaults >; -export type ContentOrderedListModifierProps = Partial<{ - type: ContentOrderedListVariables["types"]; // tslint:disable-line:no-reserved-keywords -}>; +export type ContentOrderedListModifierProps = { + type?: ContentOrderedListVariables["types"]; // tslint:disable-line:no-reserved-keywords +}; export type ContentOrderedListProps = HelpersProps & ContentOrderedListModifierProps; diff --git a/src/elements/content/content.tsx b/src/elements/content/content.tsx index 67079830..925f848c 100644 --- a/src/elements/content/content.tsx +++ b/src/elements/content/content.tsx @@ -22,9 +22,9 @@ export type ContentVariables = Prefer< ContentVariablesDefaults >; -export type ContentModifierProps = Partial<{ - size: ContentVariables["sizes"]; -}>; +export type ContentModifierProps = { + size?: ContentVariables["sizes"]; +}; export type ContentProps = HelpersProps & ContentModifierProps; diff --git a/src/elements/form/control.tsx b/src/elements/form/control.tsx index 0116225e..459c8c66 100644 --- a/src/elements/form/control.tsx +++ b/src/elements/form/control.tsx @@ -21,13 +21,13 @@ export type ControlVariables = Prefer< ControlVariablesDefaults >; -export type ControlModifierProps = Partial<{ - expanded: boolean; - iconLeft: boolean; - iconRight: boolean; - loading: boolean; - size: ControlVariables["sizes"]; -}>; +export type ControlModifierProps = { + expanded?: boolean; + iconLeft?: boolean; + iconRight?: boolean; + loading?: boolean; + size?: ControlVariables["sizes"]; +}; export type ControlProps = HelpersProps & ControlModifierProps; diff --git a/src/elements/form/field-label.tsx b/src/elements/form/field-label.tsx index 7a038f0d..5777ea03 100644 --- a/src/elements/form/field-label.tsx +++ b/src/elements/form/field-label.tsx @@ -21,9 +21,9 @@ export type FieldLabelVariables = Prefer< FieldLabelVariablesDefaults >; -export type FieldLabelModifierProps = Partial<{ - size: FieldLabelVariables["sizes"]; -}>; +export type FieldLabelModifierProps = { + size?: FieldLabelVariables["sizes"]; +}; export type FieldLabelProps = HelpersProps & FieldLabelModifierProps; diff --git a/src/elements/form/field.tsx b/src/elements/form/field.tsx index 7b82932e..fc32efca 100644 --- a/src/elements/form/field.tsx +++ b/src/elements/form/field.tsx @@ -25,14 +25,14 @@ export type FieldVariables = Prefer< FieldVariablesDefaults >; -export type FieldModifierProps = Partial<{ - align: FieldVariables["alignments"]; - expanded: boolean; - horizontal: boolean; - kind: FieldVariables["kinds"]; - multiline: boolean; - narrow: boolean; -}>; +export type FieldModifierProps = { + align?: FieldVariables["alignments"]; + expanded?: boolean; + horizontal?: boolean; + kind?: FieldVariables["kinds"]; + multiline?: boolean; + narrow?: boolean; +}; export type FieldProps = HelpersProps & FieldModifierProps; diff --git a/src/elements/form/fieldset.tsx b/src/elements/form/fieldset.tsx index 3fd6abef..af9efb43 100644 --- a/src/elements/form/fieldset.tsx +++ b/src/elements/form/fieldset.tsx @@ -4,9 +4,9 @@ import React from "react"; import { forwardRefAs, Generic } from "../../base"; import { HelpersProps } from "../../base/helpers"; -export type FieldsetModifierProps = Partial<{ - disabled: boolean; -}>; +export type FieldsetModifierProps = { + disabled?: boolean; +}; export type FieldsetProps = HelpersProps & FieldsetModifierProps; diff --git a/src/elements/form/file.tsx b/src/elements/form/file.tsx index 8ede82e7..ebeea68c 100644 --- a/src/elements/form/file.tsx +++ b/src/elements/form/file.tsx @@ -30,14 +30,14 @@ export type FileVariables = Prefer< FileVariablesDefaults >; -export type FileModifierProps = Partial<{ - align: FileVariables["alignments"]; - boxed: boolean; - color: Variables["colors"]; - fullwidth: boolean; - hasName: boolean; - size: FileVariables["sizes"]; -}>; +export type FileModifierProps = { + align?: FileVariables["alignments"]; + boxed?: boolean; + color?: Variables["colors"]; + fullwidth?: boolean; + hasName?: boolean; + size?: FileVariables["sizes"]; +}; export type FileProps = HelpersProps & FileModifierProps; diff --git a/src/elements/form/help.tsx b/src/elements/form/help.tsx index e0d943d6..91c18689 100644 --- a/src/elements/form/help.tsx +++ b/src/elements/form/help.tsx @@ -6,9 +6,9 @@ import { forwardRefAs, Generic } from "../../base"; import { HelpersProps } from "../../base/helpers"; import { Variables } from "../../base/helpers/variables"; -export type HelpModifierProps = Partial<{ - color: Variables["colors"]; -}>; +export type HelpModifierProps = { + color?: Variables["colors"]; +}; export type HelpProps = HelpersProps & HelpModifierProps; diff --git a/src/elements/form/input.tsx b/src/elements/form/input.tsx index 410ce151..fb15ccf5 100644 --- a/src/elements/form/input.tsx +++ b/src/elements/form/input.tsx @@ -36,15 +36,15 @@ export type InputVariables = Prefer< InputVariablesDefaults >; -export type InputModifierProps = Partial<{ - color: Variables["colors"]; - readOnly: React.InputHTMLAttributes["readOnly"]; - rounded: boolean; - size: InputVariables["sizes"]; - state: InputVariables["states"]; - static: boolean; // tslint:disable-line:no-reserved-keywords - type: InputVariables["types"]; // tslint:disable-line:no-reserved-keywords -}>; +export type InputModifierProps = { + color?: Variables["colors"]; + readOnly?: React.InputHTMLAttributes["readOnly"]; + rounded?: boolean; + size?: InputVariables["sizes"]; + state?: InputVariables["states"]; + static?: boolean; // tslint:disable-line:no-reserved-keywords + type?: InputVariables["types"]; // tslint:disable-line:no-reserved-keywords +}; export type InputProps = HelpersProps & InputModifierProps; diff --git a/src/elements/form/label.tsx b/src/elements/form/label.tsx index a0a74f46..5fa7c182 100644 --- a/src/elements/form/label.tsx +++ b/src/elements/form/label.tsx @@ -23,10 +23,10 @@ export type LabelVariables = Prefer< LabelVariablesDefaults >; -export type LabelModifierProps = Partial<{ - disabled: boolean; - size: LabelVariables["sizes"]; -}>; +export type LabelModifierProps = { + disabled?: boolean; + size?: LabelVariables["sizes"]; +}; export type LabelProps = HelpersProps & LabelModifierProps; diff --git a/src/elements/form/select.tsx b/src/elements/form/select.tsx index e3f1e371..7ec5406e 100644 --- a/src/elements/form/select.tsx +++ b/src/elements/form/select.tsx @@ -25,13 +25,13 @@ export type SelectContainerVariables = Prefer< SelectContainerVariablesDefaults >; -export type SelectContainerModifierProps = Partial<{ - color: Variables["colors"]; - fullwidth: boolean; - rounded: boolean; - size: SelectContainerVariables["sizes"]; - state: SelectContainerVariables["states"]; -}>; +export type SelectContainerModifierProps = { + color?: Variables["colors"]; + fullwidth?: boolean; + rounded?: boolean; + size?: SelectContainerVariables["sizes"]; + state?: SelectContainerVariables["states"]; +}; export type SelectContainerProps = HelpersProps & SelectContainerModifierProps; diff --git a/src/elements/form/textarea.tsx b/src/elements/form/textarea.tsx index 215cb933..eb7e44b8 100644 --- a/src/elements/form/textarea.tsx +++ b/src/elements/form/textarea.tsx @@ -24,12 +24,12 @@ export type TextareaVariables = Prefer< TextareaVariablesDefaults >; -export type TextareaModifierProps = Partial<{ - color: Variables["colors"]; - fixedSize: boolean; - size: TextareaVariables["sizes"]; - state: TextareaVariables["states"]; -}>; +export type TextareaModifierProps = { + color?: Variables["colors"]; + fixedSize?: boolean; + size?: TextareaVariables["sizes"]; + state?: TextareaVariables["states"]; +}; export type TextareaProps = HelpersProps & TextareaModifierProps; diff --git a/src/elements/icon/icon.tsx b/src/elements/icon/icon.tsx index 5158774f..4b0db3fc 100644 --- a/src/elements/icon/icon.tsx +++ b/src/elements/icon/icon.tsx @@ -24,11 +24,11 @@ export type IconVariables = Prefer< IconVariablesDefaults >; -export type IconModifierProps = Partial<{ - align: IconVariables["alignments"]; - color: Variables["colors"]; - size: IconVariables["sizes"]; -}>; +export type IconModifierProps = { + align?: IconVariables["alignments"]; + color?: Variables["colors"]; + size?: IconVariables["sizes"]; +}; export type IconProps = HelpersProps & IconModifierProps; diff --git a/src/elements/image/image-container.tsx b/src/elements/image/image-container.tsx index ef229cb8..b38b3bec 100644 --- a/src/elements/image/image-container.tsx +++ b/src/elements/image/image-container.tsx @@ -41,9 +41,9 @@ export type ImageContainerVariables = Prefer< ImageContainerVariablesDefaults >; -export type ImageContainerModifierProps = Partial<{ - size: ImageContainerVariables["sizes"]; -}>; +export type ImageContainerModifierProps = { + size?: ImageContainerVariables["sizes"]; +}; export type ImageContainerProps = HelpersProps & ImageContainerModifierProps; diff --git a/src/elements/image/image.tsx b/src/elements/image/image.tsx index 7eff5ede..d4ca1a69 100644 --- a/src/elements/image/image.tsx +++ b/src/elements/image/image.tsx @@ -6,9 +6,9 @@ import { forwardRefAs, Generic } from "../../base"; import { HelpersProps } from "../../base/helpers"; import { ImageContainer } from "./image-container"; -export type ImageModifierProps = Partial<{ - rounded: boolean; -}>; +export type ImageModifierProps = { + rounded?: boolean; +}; export type ImageProps = HelpersProps & ImageModifierProps; diff --git a/src/elements/notification/notification.tsx b/src/elements/notification/notification.tsx index 1820f143..90888cc9 100644 --- a/src/elements/notification/notification.tsx +++ b/src/elements/notification/notification.tsx @@ -6,9 +6,9 @@ import { forwardRefAs, Generic } from "../../base"; import { HelpersProps } from "../../base/helpers"; import { Variables } from "../../base/helpers/variables"; -export type NotificationModifierProps = Partial<{ - color: Variables["colors"]; -}>; +export type NotificationModifierProps = { + color?: Variables["colors"]; +}; export type NotificationProps = HelpersProps & NotificationModifierProps; diff --git a/src/elements/other/delete.tsx b/src/elements/other/delete.tsx index c864670d..09daa8fb 100644 --- a/src/elements/other/delete.tsx +++ b/src/elements/other/delete.tsx @@ -21,9 +21,9 @@ export type DeleteVariables = Prefer< DeleteVariablesDefaults >; -export type DeleteModifierProps = Partial<{ - size: DeleteVariables["sizes"]; -}>; +export type DeleteModifierProps = { + size?: DeleteVariables["sizes"]; +}; export type DeleteProps = HelpersProps & DeleteModifierProps; diff --git a/src/elements/progress/progress.tsx b/src/elements/progress/progress.tsx index e57f6c07..49e28b4c 100644 --- a/src/elements/progress/progress.tsx +++ b/src/elements/progress/progress.tsx @@ -22,12 +22,12 @@ export type ProgressVariables = Prefer< ProgressVariablesDefaults >; -export type ProgressModifierProps = Partial<{ - color: Variables["colors"]; - max: number; - size: ProgressVariables["sizes"]; - value: number; -}>; +export type ProgressModifierProps = { + color?: Variables["colors"]; + max?: number; + size?: ProgressVariables["sizes"]; + value?: number; +}; export type ProgressProps = HelpersProps & ProgressModifierProps; diff --git a/src/elements/table/table-row.tsx b/src/elements/table/table-row.tsx index 844645c0..3f2f0c36 100644 --- a/src/elements/table/table-row.tsx +++ b/src/elements/table/table-row.tsx @@ -5,9 +5,9 @@ import React from "react"; import { forwardRefAs, Generic } from "../../base"; import { HelpersProps } from "../../base/helpers"; -export type TableRowHelperProps = Partial<{ - selected: boolean; -}>; +export type TableRowHelperProps = { + selected?: boolean; +}; export type TableRowProps = HelpersProps & TableRowHelperProps; diff --git a/src/elements/table/table.tsx b/src/elements/table/table.tsx index 424c167a..539d0031 100644 --- a/src/elements/table/table.tsx +++ b/src/elements/table/table.tsx @@ -11,13 +11,13 @@ import { TableHead } from "./table-head"; import { TableHeading } from "./table-heading"; import { TableRow } from "./table-row"; -export type TableModifierProps = Partial<{ - bordered: boolean; - fullwidth: boolean; - hoverable: boolean; - narrow: boolean; - striped: boolean; -}>; +export type TableModifierProps = { + bordered?: boolean; + fullwidth?: boolean; + hoverable?: boolean; + narrow?: boolean; + striped?: boolean; +}; export type TableProps = HelpersProps & TableModifierProps; diff --git a/src/elements/tag/tag-group.tsx b/src/elements/tag/tag-group.tsx index 981e221d..16ea32b7 100644 --- a/src/elements/tag/tag-group.tsx +++ b/src/elements/tag/tag-group.tsx @@ -21,10 +21,10 @@ export type TagGroupVariables = Prefer< TagGroupVariablesDefaults >; -export type TagGroupModifierProps = Partial<{ - gapless: boolean; - size: TagGroupVariables["sizes"]; -}>; +export type TagGroupModifierProps = { + gapless?: boolean; + size?: TagGroupVariables["sizes"]; +}; export type TagGroupProps = HelpersProps & TagGroupModifierProps; diff --git a/src/elements/tag/tag.tsx b/src/elements/tag/tag.tsx index d3cd9676..bb2fb839 100644 --- a/src/elements/tag/tag.tsx +++ b/src/elements/tag/tag.tsx @@ -20,12 +20,12 @@ export interface TagVariablesDefaults { export type TagVariables = Prefer; -export type TagModifierProps = Partial<{ - color: Variables["colors"]; - delete: boolean; // tslint:disable-line:no-reserved-keywords - rounded: boolean; - size: TagVariables["sizes"]; -}>; +export type TagModifierProps = { + color?: Variables["colors"]; + delete?: boolean; // tslint:disable-line:no-reserved-keywords + rounded?: boolean; + size?: TagVariables["sizes"]; +}; export type TagProps = HelpersProps & TagModifierProps; diff --git a/src/elements/title/title.tsx b/src/elements/title/title.tsx index 4ea0e7e9..acd85368 100644 --- a/src/elements/title/title.tsx +++ b/src/elements/title/title.tsx @@ -21,11 +21,11 @@ export type TitleVariables = Prefer< TitleVariablesDefaults >; -export type TitleModifierProps = Partial<{ - size: TitleVariables["sizes"]; - spaced: boolean; - subtitle: boolean; -}>; +export type TitleModifierProps = { + size?: TitleVariables["sizes"]; + spaced?: boolean; + subtitle?: boolean; +}; export type TitleProps = HelpersProps & TitleModifierProps; diff --git a/src/extensions/divider/divider.tsx b/src/extensions/divider/divider.tsx index 51fa703d..4034587d 100644 --- a/src/extensions/divider/divider.tsx +++ b/src/extensions/divider/divider.tsx @@ -6,11 +6,11 @@ import { forwardRefAs, Generic } from "../../base"; import { HelpersProps } from "../../base/helpers"; import { Variables } from "../../base/helpers/variables"; -export type DividerModifierProps = Partial<{ - children: string | number; - color: Variables["colors"]; - vertical: boolean; -}>; +export type DividerModifierProps = { + children?: string | number; + color?: Variables["colors"]; + vertical?: boolean; +}; export type DividerProps = HelpersProps & DividerModifierProps; diff --git a/src/extensions/page-loader/page-loader.tsx b/src/extensions/page-loader/page-loader.tsx index 481c4ab4..47ead768 100644 --- a/src/extensions/page-loader/page-loader.tsx +++ b/src/extensions/page-loader/page-loader.tsx @@ -10,11 +10,11 @@ export const PAGE_LOADER_DEFAULTS = { directions: ["right-to-left", "left-to-right"] as const, }; -export type PageLoaderModifierProps = Partial<{ - active: boolean; - color: Variables["colors"]; - direction: (typeof PAGE_LOADER_DEFAULTS["directions"])[number]; -}>; +export type PageLoaderModifierProps = { + active?: boolean; + color?: Variables["colors"]; + direction?: (typeof PAGE_LOADER_DEFAULTS["directions"])[number]; +}; export type PageLoaderProps = HelpersProps & PageLoaderModifierProps; diff --git a/src/grid/columns/column-group.tsx b/src/grid/columns/column-group.tsx index 3abecdc2..cae6afec 100644 --- a/src/grid/columns/column-group.tsx +++ b/src/grid/columns/column-group.tsx @@ -22,38 +22,38 @@ export type ColumnGroupVariables = Prefer< ColumnGroupVariablesDefaults >; -export type ColumnGroupBreakpointOptions = Partial<{ +export type ColumnGroupBreakpointOptions = { /** * The column gap size for a breakapoint */ - gapSize: ColumnGroupVariables["gapSizes"]; -}>; + gapSize?: ColumnGroupVariables["gapSizes"]; +}; -type ColumnGroupModifierProps = Partial< - { [B in Variables["breakpoints"]]: ColumnGroupBreakpointOptions } & { - /** - * Breakpoint where columns become stacked. - */ - breakpoint: Variables["breakpoints"]; - /** - * `true` you want the columns inside to be horizontaly centered - */ - centered: boolean; - /** - * `true` to remove space between columns - */ - gapless: boolean; - /** - * `true` if you want to use more than one line if you add more column - * elements that would fit in a single row. - */ - multiline: boolean; - /** - * `true` if you want the columns to be vertically centered. - */ - vcentered: boolean; - } & ColumnGroupBreakpointOptions ->; +type ColumnGroupModifierProps = { + [B in Variables["breakpoints"]]?: ColumnGroupBreakpointOptions; +} & { + /** + * Breakpoint where columns become stacked. + */ + breakpoint?: Variables["breakpoints"]; + /** + * `true` you want the columns inside to be horizontaly centered + */ + centered?: boolean; + /** + * `true` to remove space between columns + */ + gapless?: boolean; + /** + * `true` if you want to use more than one line if you add more column + * elements that would fit in a single row. + */ + multiline?: boolean; + /** + * `true` if you want the columns to be vertically centered. + */ + vcentered?: boolean; +} & ColumnGroupBreakpointOptions; export type ColumnGroupProps = HelpersProps & ColumnGroupModifierProps; diff --git a/src/grid/columns/column.tsx b/src/grid/columns/column.tsx index bb76d34d..06ad2b22 100644 --- a/src/grid/columns/column.tsx +++ b/src/grid/columns/column.tsx @@ -47,26 +47,26 @@ export type ColumnVariables = Prefer< ColumnVariablesDefaults >; -export type ColumnBreakpointOptions = Partial<{ +export type ColumnBreakpointOptions = { /** * If you want a column to only take the space it needs, use the narrow * modifier. The other column(s) will fill up the remaining space. */ - narrow: boolean; + narrow?: boolean; /** * Create horizontal space around Column elements */ - offset: ColumnVariables["sizes"]; + offset?: ColumnVariables["sizes"]; /** * The size of the column. the maximun size of a row is 12 */ - size: ColumnVariables["sizes"]; -}>; + size?: ColumnVariables["sizes"]; +}; -export type ColumnModifierProps = Partial< - { [B in Variables["breakpoints"]]: ColumnBreakpointOptions } & - ColumnBreakpointOptions ->; +export type ColumnModifierProps = { + [B in Variables["breakpoints"]]?: ColumnBreakpointOptions +} & + ColumnBreakpointOptions; export type ColumnProps = HelpersProps & ColumnModifierProps; diff --git a/src/grid/tiles/tile.tsx b/src/grid/tiles/tile.tsx index 709fe51e..5d56671e 100644 --- a/src/grid/tiles/tile.tsx +++ b/src/grid/tiles/tile.tsx @@ -23,11 +23,11 @@ export type TileVariables = Prefer< TileVariablesDefaults >; -export type TileModifierProps = Partial<{ - kind: TileVariables["kinds"]; - size: TileVariables["sizes"]; - vertical: boolean; -}>; +export type TileModifierProps = { + kind?: TileVariables["kinds"]; + size?: TileVariables["sizes"]; + vertical?: boolean; +}; export type TileProps = HelpersProps & TileModifierProps; diff --git a/src/layout/hero/hero.tsx b/src/layout/hero/hero.tsx index d9f4a120..4d9c2e34 100644 --- a/src/layout/hero/hero.tsx +++ b/src/layout/hero/hero.tsx @@ -31,11 +31,11 @@ export type HeroVariables = Prefer< HeroVariablesDefaults >; -export type HeroModifierProps = Partial<{ - color: Variables["colors"]; - gradient: boolean; - size: HeroVariables["sizes"]; -}>; +export type HeroModifierProps = { + color?: Variables["colors"]; + gradient?: boolean; + size?: HeroVariables["sizes"]; +}; export type HeroProps = HelpersProps & HeroModifierProps; diff --git a/src/layout/section/section.tsx b/src/layout/section/section.tsx index 3c67867c..9f72005a 100644 --- a/src/layout/section/section.tsx +++ b/src/layout/section/section.tsx @@ -21,9 +21,9 @@ export type SectionVariables = Prefer< SectionVariablesDefaults >; -export type SectionModifierProps = Partial<{ - size: SectionVariables["sizes"]; -}>; +export type SectionModifierProps = { + size?: SectionVariables["sizes"]; +}; export type SectionProps = HelpersProps & SectionModifierProps;