diff --git a/packages/core/src/common/_mixins.scss b/packages/core/src/common/_mixins.scss index e00f41aefb..b0c1e2862a 100644 --- a/packages/core/src/common/_mixins.scss +++ b/packages/core/src/common/_mixins.scss @@ -51,7 +51,7 @@ $pt-dark-intent-text-colors: ( color: $pt-heading-color; font-weight: 600; - .pt-dark & { + .#{$ns}-dark & { color: $pt-dark-heading-color; } } diff --git a/packages/core/src/common/classes.ts b/packages/core/src/common/classes.ts index e3ef64fc11..6a5bd22f75 100644 --- a/packages/core/src/common/classes.ts +++ b/packages/core/src/common/classes.ts @@ -76,7 +76,6 @@ export const BUTTON_TEXT = `${BUTTON}-text`; export const CALLOUT = `${NS}-callout`; export const CALLOUT_ICON = `${CALLOUT}-icon`; -export const CALLOUT_TITLE = `${CALLOUT}-title`; export const CARD = `${NS}-card`; @@ -97,7 +96,6 @@ export const DIALOG_CLOSE_BUTTON = `${DIALOG}-close-button`; export const DIALOG_FOOTER = `${DIALOG}-footer`; export const DIALOG_FOOTER_ACTIONS = `${DIALOG}-footer-actions`; export const DIALOG_HEADER = `${DIALOG}-header`; -export const DIALOG_HEADER_TITLE = `${DIALOG}-header-title`; export const EDITABLE_TEXT = `${NS}-editable-text`; export const EDITABLE_TEXT_CONTENT = `${EDITABLE_TEXT}-content`; diff --git a/packages/core/src/components/button/button.md b/packages/core/src/components/button/button.md index ddb6f979f7..4d485d536c 100644 --- a/packages/core/src/components/button/button.md +++ b/packages/core/src/components/button/button.md @@ -56,7 +56,7 @@ Blueprint class name. If you specify other attributes that the component provide for an ``, you'll overide the default value.
-

Interactions with disabled buttons

+

Interactions with disabled buttons

Use `AnchorButton` if you need mouse interaction events (such as hovering) on a disabled button. This is because `Button` and `AnchorButton` handle the `disabled` prop differently: `Button` uses the native `disabled` attribute on the ` diff --git a/packages/core/src/components/callout/_callout.scss b/packages/core/src/components/callout/_callout.scss index 3abdca0ece..970cc1223f 100644 --- a/packages/core/src/components/callout/_callout.scss +++ b/packages/core/src/components/callout/_callout.scss @@ -8,7 +8,7 @@ Callout Markup:
-

Callout Heading

+

Callout Heading

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ex, delectus!
@@ -53,7 +53,7 @@ Styleguide callout } } - .#{$ns}-callout-title { + .#{$ns}-heading { margin-top: 0; margin-bottom: $pt-grid-size / 2; line-height: $pt-icon-size-large; @@ -73,7 +73,7 @@ Styleguide callout &[class*="#{$ns}-icon-"]::before, .#{$ns}-icon, - .#{$ns}-callout-title { + .#{$ns}-heading { color: map-get($pt-intent-text-colors, $intent); } @@ -82,7 +82,7 @@ Styleguide callout &[class*="#{$ns}-icon-"]::before, .#{$ns}-callout-icon, - .#{$ns}-callout-title { + .#{$ns}-heading { color: map-get($pt-dark-intent-text-colors, $intent); } } diff --git a/packages/core/src/components/callout/callout.md b/packages/core/src/components/callout/callout.md index f4b1734a8c..427ed11be4 100644 --- a/packages/core/src/components/callout/callout.md +++ b/packages/core/src/components/callout/callout.md @@ -7,7 +7,7 @@ Callouts visually highlight important content for the user. @## CSS API Callouts use the same visual intent modifier classes as buttons. If you need a -heading, use the `

` element with a `.@ns-callout-title` class. +heading, use the `

` element with a `.@ns-heading` class.
Note that the title is entirely optional. diff --git a/packages/core/src/components/callout/callout.tsx b/packages/core/src/components/callout/callout.tsx index 3d832b574a..ab18ce6f5a 100644 --- a/packages/core/src/components/callout/callout.tsx +++ b/packages/core/src/components/callout/callout.tsx @@ -25,7 +25,7 @@ export interface ICalloutProps extends IIntentProps, IProps, HTMLDivProps { * String content of optional title element. * * Due to a conflict with the HTML prop types, to provide JSX content simply - * pass `

JSX title content

` as + * pass `

JSX title content

` as * first `children` element instead of using this prop. */ title?: string; @@ -33,8 +33,8 @@ export interface ICalloutProps extends IIntentProps, IProps, HTMLDivProps { export class Callout extends React.PureComponent { public render() { - const { className, children, icon: _nospread, intent, title, ...htmlProps } = this.props; - const iconName = this.getIconName(); + const { className, children, icon, intent, title, ...htmlProps } = this.props; + const iconName = this.getIconName(icon, intent); const classes = classNames( Classes.CALLOUT, Classes.intentClass(intent), @@ -45,14 +45,13 @@ export class Callout extends React.PureComponent { return (
{iconName && } - {title &&

{title}

} + {title &&

{title}

} {children}
); } - private getIconName(): JSX.Element | IconName | undefined { - const { icon, intent } = this.props; + private getIconName(icon?: ICalloutProps["icon"], intent?: Intent): JSX.Element | IconName | undefined { // 1. no icon if (icon === null) { return undefined; diff --git a/packages/core/src/components/dialog/_dialog.scss b/packages/core/src/components/dialog/_dialog.scss index 1358eaa28f..25ead24e59 100644 --- a/packages/core/src/components/dialog/_dialog.scss +++ b/packages/core/src/components/dialog/_dialog.scss @@ -15,7 +15,7 @@ Markup:
-

Dialog header

+

Dialog header

@@ -107,7 +107,7 @@ $dialog-padding: $pt-grid-size * 2 !default; color: $pt-icon-color; } - .#{$ns}-dialog-header-title { + .#{$ns}-heading { @include overflow-ellipsis(); flex: 1 1 auto; margin: 0; @@ -126,10 +126,6 @@ $dialog-padding: $pt-grid-size * 2 !default; .#{$ns}-icon { color: $pt-dark-icon-color; } - - .#{$ns}-dialog-header-title { - color: $pt-dark-heading-color; - } } } diff --git a/packages/core/src/components/dialog/dialog.md b/packages/core/src/components/dialog/dialog.md index 7bb7a3ddd1..3d05dbc9c5 100644 --- a/packages/core/src/components/dialog/dialog.md +++ b/packages/core/src/components/dialog/dialog.md @@ -3,7 +3,7 @@ Dialogs present content overlaid over other parts of the UI.
-

Terminology note

+

Terminology note

The term "modal" is sometimes used to mean "dialog," but this is a misnomer. _Modal_ is an adjective that describes parts of a UI. An element is considered modal if it diff --git a/packages/core/src/components/dialog/dialog.tsx b/packages/core/src/components/dialog/dialog.tsx index 10d1bfc2e3..0ebe8031e2 100644 --- a/packages/core/src/components/dialog/dialog.tsx +++ b/packages/core/src/components/dialog/dialog.tsx @@ -115,7 +115,7 @@ export class Dialog extends AbstractPureComponent { return (
-

{title}

+

{title}

{this.maybeRenderCloseButton()}
); diff --git a/packages/core/src/components/editable-text/editable-text.md b/packages/core/src/components/editable-text/editable-text.md index 5698f51ba4..32b507c63e 100644 --- a/packages/core/src/components/editable-text/editable-text.md +++ b/packages/core/src/components/editable-text/editable-text.md @@ -12,7 +12,7 @@ You should not use `EditableText` when a static always-editable `` or `