Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/calcite-components/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ export namespace Components {
*/
"appearance": Extract<"solid" | "transparent", Appearance>;
/**
* When `true`, the side padding of the component is reduced. Compact mode is used internally by components, e.g. `calcite-block-section`.
* When `true`, the side padding of the component is reduced.
* @deprecated No longer necessary.
*/
"compact": boolean;
/**
Expand Down Expand Up @@ -8051,7 +8052,8 @@ declare namespace LocalJSX {
*/
"appearance"?: Extract<"solid" | "transparent", Appearance>;
/**
* When `true`, the side padding of the component is reduced. Compact mode is used internally by components, e.g. `calcite-block-section`.
* When `true`, the side padding of the component is reduced.
* @deprecated No longer necessary.
*/
"compact"?: boolean;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe("calcite-action", () => {
defaultValue: "solid",
},
{
propertyName: "compact",
propertyName: "compact", // (deprecated)
defaultValue: false,
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
}
}

// Compact
/* [Deprecated] Compact */
:host([scale="s"][compact]) .button,
:host([scale="m"][compact]) .button,
:host([scale="l"][compact]) .button {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ type ActionStoryArgs = Pick<
| "active"
| "alignment"
| "appearance"
| "compact"
| "disabled"
| "icon"
| "indicator"
Expand All @@ -27,7 +26,6 @@ export default {
active: false,
alignment: alignment.defaultValue,
appearance: appearance.defaultValue,
compact: false,
disabled: false,
icon: "banana",
indicator: false,
Expand Down Expand Up @@ -63,7 +61,6 @@ export const simple = (args: ActionStoryArgs): string => html`
${boolean("active", args.active)}
alignment="${args.alignment}"
appearance="${args.appearance}"
${boolean("compact", args.compact)}
${boolean("disabled", args.disabled)}
icon="${args.icon}"
${boolean("indicator", args.indicator)}
Expand All @@ -76,15 +73,14 @@ export const simple = (args: ActionStoryArgs): string => html`
</div>
`;

export const disabledAndCompactAndTextOnly_TestOnly = (): string => html`
export const disabledAndTextOnly_TestOnly = (): string => html`
<div>
<calcite-action
icon="banana"
alignment="start"
appearance="solid"
label="Label"
scale="m"
compact
disabled
text="Text"
text-enabled
Expand Down
4 changes: 3 additions & 1 deletion packages/calcite-components/src/components/action/action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ export class Action
@Prop({ reflect: true }) appearance: Extract<"solid" | "transparent", Appearance> = "solid";

/**
* When `true`, the side padding of the component is reduced. Compact mode is used internally by components, e.g. `calcite-block-section`.
* When `true`, the side padding of the component is reduced.
*
* @deprecated No longer necessary.
*/
@Prop({ reflect: true }) compact = false;

Expand Down