diff --git a/packages/demo-app/src/examples/ExampleCard.tsx b/packages/demo-app/src/examples/ExampleCard.tsx index 201fc271fea..b7a779057d7 100644 --- a/packages/demo-app/src/examples/ExampleCard.tsx +++ b/packages/demo-app/src/examples/ExampleCard.tsx @@ -14,10 +14,9 @@ * limitations under the License. */ -import classNames from "classnames"; import * as React from "react"; -import { Card, H5 } from "@blueprintjs/core"; +import { Box, Card, H5 } from "@blueprintjs/core"; export interface ExampleCardProps { children: React.ReactNode; @@ -31,17 +30,19 @@ const DEFAULT_WIDTH = 500; export class ExampleCard extends React.PureComponent { public render() { - const { width = DEFAULT_WIDTH } = this.props; + const { children, horizontal, label, subLabel, width = DEFAULT_WIDTH } = this.props; return (
-
{this.props.label}
- {this.props.subLabel ??
{this.props.subLabel}
} - - {this.props.children} +
{label}
+ {subLabel && ( + + {subLabel} + + )} + + + {children} +
); diff --git a/packages/demo-app/src/styles/_examples.scss b/packages/demo-app/src/styles/_examples.scss index 1378442d3b6..e282be88424 100644 --- a/packages/demo-app/src/styles/_examples.scss +++ b/packages/demo-app/src/styles/_examples.scss @@ -52,23 +52,6 @@ $dark-intent-danger-text: $red5; .example-card { background-color: $content-background-color; - display: flex; - flex-direction: column; - margin-bottom: 10px; - - > :not(:last-child) { - margin-bottom: 10px; - } - - &.horizontal { - flex-direction: row; - justify-content: center; - - > :not(:last-child) { - margin-bottom: 0; - margin-right: 10px; - } - } } .tag-container {