mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-16 22:46:03 +01:00
feat(interface/input): add size to input dialog options (#32)
This commit is contained in:
@@ -35,6 +35,7 @@ local input
|
|||||||
|
|
||||||
---@class InputDialogOptionsProps
|
---@class InputDialogOptionsProps
|
||||||
---@field allowCancel? boolean
|
---@field allowCancel? boolean
|
||||||
|
---@field size? 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
||||||
|
|
||||||
---@param heading string
|
---@param heading string
|
||||||
---@param rows string[] | InputDialogRowProps[]
|
---@param rows string[] | InputDialogRowProps[]
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ const InputDialog: React.FC = () => {
|
|||||||
centered
|
centered
|
||||||
closeOnEscape={fields.options?.allowCancel !== false}
|
closeOnEscape={fields.options?.allowCancel !== false}
|
||||||
closeOnClickOutside={false}
|
closeOnClickOutside={false}
|
||||||
size="xs"
|
size={fields.options?.size || 'xs'}
|
||||||
styles={{ title: { textAlign: 'center', width: '100%', fontSize: 18 } }}
|
styles={{ title: { textAlign: 'center', width: '100%', fontSize: 18 } }}
|
||||||
title={fields.heading}
|
title={fields.heading}
|
||||||
withCloseButton={false}
|
withCloseButton={false}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ export interface InputProps {
|
|||||||
rows: Array<IInput | ICheckbox | ISelect | INumber | ISlider | IColorInput | IDateInput | ITextarea | ITimeInput>;
|
rows: Array<IInput | ICheckbox | ISelect | INumber | ISlider | IColorInput | IDateInput | ITextarea | ITimeInput>;
|
||||||
options?: {
|
options?: {
|
||||||
allowCancel?: boolean;
|
allowCancel?: boolean;
|
||||||
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user