-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ unocss rules/shortcut of ion-popup #113
- Loading branch information
Showing
3 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@fessional/razor-mobile": patch | ||
"@fessional/razor-common": patch | ||
--- | ||
|
||
✨ unocss ion-fit-card, common bool convertor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { defineConfig } from 'unocss'; | ||
|
||
export default defineConfig({ | ||
rules: [ | ||
['ion-var-fit', { | ||
'--width': 'fix-context', | ||
'--height': 'fit-content', | ||
}], | ||
// https://ionicframework.com/docs/api/card | ||
['ion-var-card', { | ||
'--border-radius': '4px', | ||
'--box-shadow': 'rgba(0, 0, 0, 0.2) 0px 3px 1px -2px, rgba(0, 0, 0, 0.14) 0px 2px 2px 0px, rgba(0, 0, 0, 0.12) 0px 1px 5px 0px', | ||
}], | ||
], | ||
shortcuts: [ | ||
{ | ||
'ion-fit-card': 'ion-var-fit ion-var-card', | ||
}, | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<template> | ||
<IonPage> | ||
<IonHeader> | ||
<IonToolbar> | ||
<IonButtons slot="start"> | ||
<IonBackButton /> | ||
</IonButtons> | ||
<IonTitle>Popup</IonTitle> | ||
<IonButtons slot="end"> | ||
<IonMenuButton /> | ||
</IonButtons> | ||
</IonToolbar> | ||
</IonHeader> | ||
<IonContent> | ||
<div class="p-4"> | ||
<IonButton id="popup-default" class="text-white"> | ||
Popup Fit Card | ||
</IonButton> | ||
<IonModal trigger="popup-default" class="ion-fit-card"> | ||
<div class="w-40 h-30 p-4"> | ||
box of w-40 h-30 p-4 | ||
</div> | ||
</IonModal> | ||
</div> | ||
</IonContent> | ||
</IonPage> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
definePageMeta({ | ||
name: 'Ion Modal popup', | ||
}); | ||
</script> |