@hybridui/button
Advanced tools
Comparing version 0.0.29 to 0.0.30
@@ -15,2 +15,3 @@ /** | ||
* @attr type | ||
* @attr used-as | ||
* @attr autofocus | ||
@@ -38,2 +39,3 @@ * @attr icon | ||
icon: string; | ||
usedas: string; | ||
/** | ||
@@ -40,0 +42,0 @@ * Content |
@@ -23,2 +23,3 @@ /** | ||
* @attr type | ||
* @attr used-as | ||
* @attr autofocus | ||
@@ -57,2 +58,3 @@ * @attr icon | ||
var _a; | ||
console.log(this.usedas); | ||
const slott = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('#slot'); | ||
@@ -71,5 +73,7 @@ const slt = slott === null || slott === void 0 ? void 0 : slott.assignedNodes(); | ||
<button | ||
part="container" | ||
?disabled="${this.disabled}" | ||
?autofocus=${this.autofocus} | ||
data-type="${this.type}" | ||
data-usedas="${this.usedas}" | ||
data-display=${this.block ? 'block' : nothing} | ||
@@ -120,2 +124,5 @@ data-size=${this.size ? this.size : nothing} | ||
property({ type: String }) | ||
], HyButtonElement.prototype, "usedas", void 0); | ||
__decorate([ | ||
property({ type: String }) | ||
], HyButtonElement.prototype, "link", void 0); | ||
@@ -122,0 +129,0 @@ __decorate([ |
@@ -234,2 +234,18 @@ import { css, html } from 'lit'; | ||
`; | ||
const usedAsStyle = css ` | ||
button[data-usedas='post'] { | ||
border-radius: var( | ||
--hybrid-button-usedas-post-border-radius, | ||
0 0.3rem 0.3rem 0 | ||
); | ||
height: 100%; | ||
} | ||
button[data-usedas='pre'] { | ||
border-radius: var( | ||
--hybrid-button-usedas-post-border-radius, | ||
0.3rem 0 0 0.3rem | ||
); | ||
height: 100%; | ||
} | ||
`; | ||
export const styles = [ | ||
@@ -244,2 +260,3 @@ baseButtonStyle, | ||
disabledButtonStyle, | ||
usedAsStyle, | ||
css ``, | ||
@@ -246,0 +263,0 @@ ]; |
{ | ||
"name": "@hybridui/button", | ||
"version": "0.0.29", | ||
"version": "0.0.30", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
33915
480