[IMP] spreadsheet: Add class props to SpreadsheetShareButton

Make the share button style parametric as we use it in different
contexts.

closes odoo/odoo#139302

Task: 3329419
Related: odoo/enterprise#49302
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
This commit is contained in:
Rémi Rahir (rar)
2023-10-24 13:55:13 +00:00
committed by Lucas Lefèvre (lul)
parent d3b5ff1290
commit b2167e0a23
2 changed files with 6 additions and 1 deletions
@@ -19,6 +19,7 @@ export class SpreadsheetShareButton extends Component {
static props = {
model: { type: Model, optional: true },
onSpreadsheetShared: Function,
togglerClass: { type: String, optional: true },
};
setup() {
@@ -26,6 +27,10 @@ export class SpreadsheetShareButton extends Component {
this.state = useState({ url: undefined });
}
get togglerClass() {
return ["btn btn-light", this.props.togglerClass].join(" ");
}
async onOpened() {
const model = this.props.model;
await waitForDataLoaded(model);
@@ -3,7 +3,7 @@
<t t-name="spreadsheet.ShareButton">
<Dropdown
togglerClass="'btn btn-light'"
togglerClass="togglerClass"
menuClass="'spreadsheet_share_dropdown d-flex flex-column'"
position="'bottom-end'"
onOpened.bind="onOpened"