Skip to content

Commit

Permalink
Update Outline & Disabled Button Cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
lucemans committed Feb 15, 2024
1 parent b3a519f commit d478a91
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
14 changes: 10 additions & 4 deletions packages/thorin-core/src/button/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export class ThorinButton extends LitElement {
--color: var(--thorin-text-secondary);
--color-hover: var(--thorin-text-secondary);
--outline: transparent;
cursor: not-allowed;
}
button.blue {
--bg: var(--thorin-blue-primary);
Expand Down Expand Up @@ -129,6 +130,7 @@ export class ThorinButton extends LitElement {
border-radius: var(--thorin-radius-button);
padding: 14px 16px;
font-weight: bold;
cursor: pointer;
}
button.full {
width: 100%;
Expand All @@ -137,11 +139,11 @@ export class ThorinButton extends LitElement {
button:active {
background: var(--bg-hover);
color: var(--color-hover);
cursor: pointer;
transform: translateY(-1px);
}
button:focus {
box-shadow: 0 0 0 2px var(--outline);
box-shadow: 0 0 0 2px var(--thorin-background-primary),
0 0 0 5px var(--outline);
}
`;

Expand All @@ -152,11 +154,15 @@ export class ThorinButton extends LitElement {
width: 'auto' | 'full' = 'auto';

@property({ attribute: false })
onclick: (_event: PointerEvent) => void = () => {};
onclick: (_event: PointerEvent) => void = () => { };

render() {
return html`
<button @click="${this._onClick}" class="${this.computeClass}">
<button
@click="${this._onClick}"
class="${this.computeClass}"
?disabled="${this.variant == 'disabled'}"
>
<slot></slot>
</button>
`;
Expand Down
5 changes: 4 additions & 1 deletion packages/thorin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
},
"keywords": [],
"author": "V3X Labs BV.",
"license": "LGPL-3.0-only"
"license": "LGPL-3.0-only",
"dependencies": {
"@ens-tools/thorin-core": "workspace:*"
}
}

0 comments on commit d478a91

Please sign in to comment.