Skip to content

Commit f6e8df1

Browse files
[CL-587] disabled item styles (#15822)
* wip * remove cursor not allowed * add disabled button story * add cursor not allowed
1 parent ca48c96 commit f6e8df1

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

libs/components/src/item/item-content.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { TypographyModule } from "../typography";
2424
* y-axis padding should be kept in sync with `item-action.component.ts`'s `top` and `bottom` units.
2525
* we want this to be the same height as the `item-action`'s `:after` element
2626
*/
27-
"tw-outline-none tw-text-main hover:tw-text-main tw-no-underline hover:tw-no-underline tw-text-base tw-py-2 tw-px-4 bit-compact:tw-py-1.5 bit-compact:tw-px-2 tw-bg-transparent tw-w-full tw-border-none tw-flex tw-gap-4 tw-items-center tw-justify-between",
27+
"tw-outline-none tw-text-main hover:tw-text-main tw-no-underline hover:tw-no-underline tw-text-base tw-py-2 tw-px-4 bit-compact:tw-py-1.5 bit-compact:tw-px-2 tw-bg-transparent tw-w-full tw-border-none tw-flex tw-gap-4 tw-items-center tw-justify-between disabled:tw-cursor-not-allowed [&[disabled]_[bittypography]]:!tw-text-secondary-300 [&[disabled]_i]:!tw-text-secondary-300",
2828
"data-fvw-target": "",
2929
},
3030
changeDetection: ChangeDetectionStrategy.OnPush,

libs/components/src/item/item.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { ItemActionComponent } from "./item-action.component";
1515
templateUrl: "item.component.html",
1616
host: {
1717
class:
18-
"tw-block tw-box-border tw-overflow-hidden tw-flex tw-bg-background [&:has([data-item-main-content]_button:hover,[data-item-main-content]_a:hover)]:tw-cursor-pointer [&:has([data-item-main-content]_button:hover,[data-item-main-content]_a:hover)]:tw-bg-hover-default tw-text-main tw-border-solid tw-border-b tw-border-0 [&:not(bit-layout_*)]:tw-rounded-lg bit-compact:[&:not(bit-layout_*)]:tw-rounded-none bit-compact:[&:not(bit-layout_*)]:last-of-type:tw-rounded-b-lg bit-compact:[&:not(bit-layout_*)]:first-of-type:tw-rounded-t-lg tw-min-h-9 tw-mb-1.5 bit-compact:tw-mb-0",
18+
"tw-block tw-box-border tw-overflow-hidden tw-flex tw-bg-background [&:has([data-item-main-content]_button:hover,[data-item-main-content]_a:hover)]:tw-cursor-pointer [&:has([data-item-main-content]_button:enabled:hover,[data-item-main-content]_a:hover)]:tw-bg-hover-default tw-text-main tw-border-solid tw-border-b tw-border-0 [&:not(bit-layout_*)]:tw-rounded-lg bit-compact:[&:not(bit-layout_*)]:tw-rounded-none bit-compact:[&:not(bit-layout_*)]:last-of-type:tw-rounded-b-lg bit-compact:[&:not(bit-layout_*)]:first-of-type:tw-rounded-t-lg tw-min-h-9 tw-mb-1.5 bit-compact:tw-mb-0",
1919
},
2020
})
2121
export class ItemComponent {

libs/components/src/item/item.stories.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ export const ContentTypes: Story = {
124124
And I am a button.
125125
</button>
126126
</bit-item>
127+
<bit-item>
128+
<button bit-item-content disabled title="I'm a disabled button">
129+
And I am a disabled button.
130+
</button>
131+
</bit-item>
127132
<bit-item>
128133
<bit-item-content>
129134
I'm just static :(

0 commit comments

Comments
 (0)