Skip to content

Commit

Permalink
Merge branch 'v2' into alpha [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
mguellsegarra committed Oct 21, 2024
2 parents fee5685 + fa8eb75 commit df60f7e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gisce/ooui",
"version": "2.13.0-alpha.2",
"version": "2.13.0",
"engines": {
"node": "20.5.0"
},
Expand Down
10 changes: 7 additions & 3 deletions src/Alert.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import Field from "./Field";
import ContainerWidget from "./ContainerWidget";
import Button from "./Button";

type AlertType = "success" | "warning" | "info" | "error" | undefined;

class Alert extends Field {
class Alert extends ContainerWidget {
/**
* Alert type
*/
Expand Down Expand Up @@ -42,10 +43,13 @@ class Alert extends Field {
this._icon = value;
}

get buttons(): Button[] {
return this._container.rows.flat().filter((b) => !b.invisible) as Button[];
}

constructor(props: any) {
super(props);
if (props) {
this._nolabel = true;
if (props.alert_type) {
this._alertType = props.alert_type;
}
Expand Down

0 comments on commit df60f7e

Please sign in to comment.