Skip to content

Commit

Permalink
fix: ensure consistent API for custom variants (#6398)
Browse files Browse the repository at this point in the history
Co-authored-by: Ryan Lee <rol@bluetel.co.uk>
  • Loading branch information
ryanolee and Ryan Lee committed Jul 15, 2022
1 parent d118898 commit 8a81903
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/CardImg.tsx
Expand Up @@ -8,7 +8,7 @@ import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
export interface CardImgProps
extends BsPrefixProps,
React.ImgHTMLAttributes<HTMLImageElement> {
variant?: 'top' | 'bottom';
variant?: 'top' | 'bottom' | string;
}

const propTypes = {
Expand Down
2 changes: 1 addition & 1 deletion src/Carousel.tsx
Expand Up @@ -25,7 +25,7 @@ import triggerBrowserReflow from './triggerBrowserReflow';
import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
import TransitionWrapper from './TransitionWrapper';

export type CarouselVariant = 'dark';
export type CarouselVariant = 'dark' | string;

export interface CarouselRef {
element?: HTMLElement;
Expand Down
2 changes: 1 addition & 1 deletion src/CloseButton.tsx
Expand Up @@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
import * as React from 'react';
import classNames from 'classnames';

export type CloseButtonVariant = 'white';
export type CloseButtonVariant = 'white' | string;

export interface CloseButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
Expand Down
2 changes: 1 addition & 1 deletion src/ListGroup.tsx
Expand Up @@ -10,7 +10,7 @@ import ListGroupItem from './ListGroupItem';
import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';

export interface ListGroupProps extends BsPrefixProps, BaseNavProps {
variant?: 'flush';
variant?: 'flush' | string;
horizontal?: boolean | string | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
defaultActiveKey?: EventKey;
numbered?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/Nav.tsx
Expand Up @@ -17,7 +17,7 @@ import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
export interface NavProps extends BsPrefixProps, BaseNavProps {
navbarBsPrefix?: string;
cardHeaderBsPrefix?: string;
variant?: 'tabs' | 'pills';
variant?: 'tabs' | 'pills' | string;
defaultActiveKey?: EventKey;
fill?: boolean;
justify?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/Navbar.tsx
Expand Up @@ -22,7 +22,7 @@ const NavbarText = createWithBsPrefix('navbar-text', {
export interface NavbarProps
extends BsPrefixProps,
Omit<React.HTMLAttributes<HTMLElement>, 'onSelect'> {
variant?: 'light' | 'dark';
variant?: 'light' | 'dark' | string;
expand?: boolean | string | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
bg?: string;
fixed?: 'top' | 'bottom';
Expand Down

0 comments on commit 8a81903

Please sign in to comment.