I am trying to style Modal so it looks like actionSheet with custom content. I cant seem to target the right element or attribute to get this right. When I use a custom class, I can see it in the DOM but its CSS properties are not showing.
This is how I want the modal to look like - I can style ion-modal
if I inspect DOM and style in Styles browser tab
Template:
<ion-button @click="openModal()">
<ion-icon :icon="addCircle"></ion-icon>
</ion-button>
Script:
import {
IonButton,
IonIcon,
modalController
} from "@ionic/vue";
import Modal from "./Modal";
import {
addCircle,
heart
} from "ionicons/icons";
methods: {
async openModal() {
const modalInstance = modalController;
const modal = await modalInstance
.create({
component: Modal,
cssClass: "custom-modal-class",
componentProps: {
context: this,
modalInstance,
},
})
return modal.present();
}
}
CSS:
// I tried both ion-modal and custom-modal-class
ion-modal {
--height: 320px;
margin-top: 500px;
border-radius: 50px 50px 0 0;
}