fix(Modal/Popover/Slideover)!: rename prevent-close to dismissible + uniformize docs

This commit is contained in:
Benjamin Canac
2024-12-16 13:11:10 +01:00
parent fdaff6630f
commit 6fb426fc17
10 changed files with 148 additions and 73 deletions

View File

@@ -11,7 +11,7 @@ const appConfig = _appConfig as AppConfig & { ui: { drawer: Partial<typeof theme
const drawer = tv({ extend: tv(theme), ...(appConfig.ui?.drawer || {}) })
export interface DrawerProps extends Pick<DrawerRootProps, 'activeSnapPoint' | 'closeThreshold' | 'defaultOpen' | 'direction' | 'dismissible' | 'fadeFromIndex' | 'fixed' | 'modal' | 'nested' | 'direction' | 'open' | 'scrollLockTimeout' | 'shouldScaleBackground' | 'snapPoints'> {
export interface DrawerProps extends Pick<DrawerRootProps, 'activeSnapPoint' | 'closeThreshold' | 'defaultOpen' | 'direction' | 'fadeFromIndex' | 'fixed' | 'modal' | 'nested' | 'direction' | 'open' | 'scrollLockTimeout' | 'shouldScaleBackground' | 'snapPoints'> {
/**
* The element or component this component should render as.
* @defaultValue 'div'
@@ -36,6 +36,11 @@ export interface DrawerProps extends Pick<DrawerRootProps, 'activeSnapPoint' | '
* @defaultValue true
*/
portal?: boolean
/**
* When `false`, the drawer will not close when clicking outside or pressing escape.
* @defaultValue true
*/
dismissible?: boolean
class?: any
ui?: Partial<typeof drawer.slots>
}