Skip to content

Commit dfe803c

Browse files
committed
[fix] Decorator & CSS Class of Nav & Pagination components
1 parent e9c5620 commit dfe803c

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "boot-cell",
3-
"version": "2.0.0-rc.2",
3+
"version": "2.0.0-rc.4",
44
"license": "LGPL-3.0",
55
"author": "[email protected]",
66
"description": "Web Components UI library based on WebCell v3, BootStrap v5, BootStrap Icon v1 & FontAwesome v6",

source/Navigator/Nav.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
WebCellProps,
88
attribute,
99
component,
10+
observer,
1011
reaction
1112
} from 'web-cell';
1213
import { CustomElement } from 'web-utility';
@@ -63,6 +64,7 @@ export interface Nav extends WebCell<NavProps> {}
6364
tagName: 'bs-nav',
6465
mode: 'open'
6566
})
67+
@observer
6668
export class Nav extends HTMLElement implements CustomElement {
6769
@attribute
6870
@observable
@@ -77,7 +79,7 @@ export class Nav extends HTMLElement implements CustomElement {
7779
accessor justify = false;
7880

7981
@reaction(({ variant, fill, justify }) => ({ variant, fill, justify }))
80-
protected updateClass({ variant, fill, justify }: this) {
82+
protected updateClass({ variant, fill, justify } = this) {
8183
this.className = classNames('nav', this.className, {
8284
[`nav-${variant}`]: variant,
8385
'nav-fill': fill,
@@ -86,6 +88,7 @@ export class Nav extends HTMLElement implements CustomElement {
8688
}
8789

8890
connectedCallback() {
91+
this.updateClass();
8992
this.role = 'tablist';
9093

9194
const navBar = this.closest<OffcanvasNavbar>(

source/Navigator/Pagination.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export const Pager: FC<PagerProps> = ({
7575

7676
return (
7777
<form
78-
className="m-0 d-flex align-items-center gap-3"
78+
className="m-0 d-flex align-items-center gap-2"
7979
onSubmit={onChange && (event => event.preventDefault())}
8080
>
8181
<FormControl

0 commit comments

Comments
 (0)