Skip to content

Commit def0263

Browse files
authored
feat: 💄 add more custom properties to uui-box (#772)
add --uui-box-border-width, add --uui-box-box-shadow, add --uui-box-border-radius
1 parent 229b8da commit def0263

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/uui-box/lib/uui-box.element.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ function slotHasContent(target: EventTarget | null): boolean {
2020
* @slot - area for the content of the box
2121
* @cssprop --uui-box-header-padding - overwrite the header padding
2222
* @cssprop --uui-box-default-padding - overwrite the box padding
23+
* @cssprop --uui-box-border-width - overwrite the box border, default is 0
24+
* @cssprop --uui-box-box-shadow - overwrite the box shadow, default is var(--uui-shadow-depth-1)
25+
* @cssprop --uui-box-border-radius - overwrite the box border-radius, default is var(--uui-border-radius)
2326
*
2427
*/
2528
@defineElement('uui-box')
@@ -119,8 +122,11 @@ export class UUIBoxElement extends LitElement {
119122
css`
120123
:host {
121124
display: block;
122-
box-shadow: var(--uui-shadow-depth-1);
123-
border-radius: var(--uui-border-radius);
125+
border: var(--uui-box-border-width, 0) solid
126+
var(--uui-color-divider-standalone);
127+
128+
box-shadow: var(--uui-box-box-shadow, var(--uui-shadow-depth-1));
129+
border-radius: var(--uui-box-border-radius, var(--uui-border-radius));
124130
background-color: var(--uui-color-surface);
125131
}
126132

0 commit comments

Comments
 (0)