diff --git a/example/src/HomePage.react.js b/example/src/HomePage.react.js index f4f22d5f..783e96bb 100644 --- a/example/src/HomePage.react.js +++ b/example/src/HomePage.react.js @@ -327,7 +327,7 @@ function Home() { - + - + - + - 132 - Sales + 132 Sales } footer={"12 waiting payments"} @@ -372,8 +371,7 @@ function Home() { icon="shopping-cart" header={ - 78 - Orders + 78 Orders } footer={"32 shipped"} @@ -385,8 +383,7 @@ function Home() { icon="users" header={ - 1,352 - Members + 1,352 Members } footer={"163 registered today"} @@ -398,8 +395,7 @@ function Home() { icon="message-square" header={ - 132 - Comments + 132 Comments } footer={"16 waiting"} diff --git a/src/components/Dropdown/Dropdown.react.js b/src/components/Dropdown/Dropdown.react.js index fc08d01c..254dcc3a 100644 --- a/src/components/Dropdown/Dropdown.react.js +++ b/src/components/Dropdown/Dropdown.react.js @@ -28,6 +28,10 @@ type DefaultProps = {| * Is this Dropdown a Card option? */ +isOption?: boolean, + /** + * Add flex classes to the Dropdown + */ + +flex?: boolean | "xs" | "sm" | "md" | "lg" | "xl", |}; type WithAnyTriggerProps = {| @@ -159,13 +163,22 @@ class Dropdown extends React.Component { }; render(): React.Node { - const { className, children, desktopOnly, isOption, ...props } = this.props; + const { + className, + children, + desktopOnly, + isOption, + flex = false, + ...props + } = this.props; const classes = cn( { dropdown: true, "d-none": desktopOnly, - "d-md-flex": desktopOnly, + "d-md-flex": desktopOnly || flex === "md", + [`d-{flex}-flex`]: ["xs", "sm", "lg", "xl"].includes(flex), + "d-flex": flex === true, "card-options-dropdown": isOption, show: this.state.isOpen, }, diff --git a/src/components/Header/H1.react.js b/src/components/Header/H1.react.js index 5bce552d..11dfc64e 100644 --- a/src/components/Header/H1.react.js +++ b/src/components/Header/H1.react.js @@ -9,6 +9,9 @@ type Props = {| +className?: string, |}; +/** + * A Header component rendered as a h1 HTML element with a margin below + */ function H1({ className, children }: Props): React.Node { const classes: string = cn("mt-0 mb-4", className); return ( diff --git a/src/components/Header/H2.react.js b/src/components/Header/H2.react.js index 2b263b7d..43d7fd46 100644 --- a/src/components/Header/H2.react.js +++ b/src/components/Header/H2.react.js @@ -9,6 +9,9 @@ type Props = {| +className?: string, |}; +/** + * A Header component rendered as a h2 HTML element with a margin below + */ function H2({ className, children }: Props): React.Node { const classes: string = cn("mt-0 mb-4", className); return ( diff --git a/src/components/Header/H3.react.js b/src/components/Header/H3.react.js index efc8dfa9..cb168148 100644 --- a/src/components/Header/H3.react.js +++ b/src/components/Header/H3.react.js @@ -9,6 +9,9 @@ type Props = {| +className?: string, |}; +/** + * A Header component rendered as a h3 HTML element with a margin below + */ function H3({ className, children }: Props): React.Node { const classes: string = cn("mt-0 mb-4", className); return ( diff --git a/src/components/Header/H4.react.js b/src/components/Header/H4.react.js index 5ec19b3d..2b4c2524 100644 --- a/src/components/Header/H4.react.js +++ b/src/components/Header/H4.react.js @@ -9,6 +9,9 @@ type Props = {| +className?: string, |}; +/** + * A Header component rendered as a h4 HTML element with a margin below + */ function H4({ className, children }: Props): React.Node { const classes: string = cn("mt-0 mb-4", className); return ( diff --git a/src/components/Header/H5.react.js b/src/components/Header/H5.react.js index d6ee6c87..30568585 100644 --- a/src/components/Header/H5.react.js +++ b/src/components/Header/H5.react.js @@ -9,6 +9,9 @@ type Props = {| +className?: string, |}; +/** + * A Header component rendered as a h5 HTML element with a margin below + */ function H5({ className, children }: Props): React.Node { const classes: string = cn("mt-0 mb-4", className); return ( diff --git a/src/components/Header/H6.react.js b/src/components/Header/H6.react.js index 71151ae1..bf0571cf 100644 --- a/src/components/Header/H6.react.js +++ b/src/components/Header/H6.react.js @@ -9,6 +9,9 @@ type Props = {| +className?: string, |}; +/** + * A Header component rendered as a h6 HTML element with a margin below + */ function H6({ className, children }: Props): React.Node { const classes: string = cn("mt-0 mb-4", className); return ( diff --git a/src/components/Header/Header.react.js b/src/components/Header/Header.react.js index f8fe3103..4663e4cb 100644 --- a/src/components/Header/Header.react.js +++ b/src/components/Header/Header.react.js @@ -25,6 +25,7 @@ type Props = {| /** * A header + * By default renders a div not a tag and has no additional spacing classes applied */ function Header({ RootComponent, diff --git a/src/components/Notification/NotificationTray.react.js b/src/components/Notification/NotificationTray.react.js index 5f6197c1..6f37b7a4 100644 --- a/src/components/Notification/NotificationTray.react.js +++ b/src/components/Notification/NotificationTray.react.js @@ -33,6 +33,7 @@ function NotificationTray(props: Props): React.Node { position="bottom-end" arrow={true} arrowPosition="right" + flex items={ {(notifications && diff --git a/src/components/StampCard/StampCard.react.js b/src/components/StampCard/StampCard.react.js index 8b903dcb..8b5ecee8 100644 --- a/src/components/StampCard/StampCard.react.js +++ b/src/components/StampCard/StampCard.react.js @@ -27,7 +27,11 @@ function StampCard({
- {header && {header}} + {header && ( +
+ {header} +
+ )} {children} {footer && {footer}}
diff --git a/src/components/Table/Table.css b/src/components/Table/Table.css index e82e49b0..705a5e49 100644 --- a/src/components/Table/Table.css +++ b/src/components/Table/Table.css @@ -1,3 +1,3 @@ -.Table.table-responsive { +.table-responsive { overflow-x: inherit !important; } diff --git a/src/components/Table/Table.react.js b/src/components/Table/Table.react.js index 9ec45aab..fe1b5535 100644 --- a/src/components/Table/Table.react.js +++ b/src/components/Table/Table.react.js @@ -96,11 +96,7 @@ function Table({ ); - return !responsive ? ( - table - ) : ( -
{table}
- ); + return !responsive ? table :
{table}
; } Table.defaultProps = {