pub struct CodeInputProps {Show 15 fields
pub name: String,
pub value: Signal<FieldValue>,
pub _on_change: Callback<FieldValue>,
pub placeholder: Option<String>,
pub required: Option<bool>,
pub disabled: Option<bool>,
pub class: Option<String>,
pub error: Option<String>,
pub has_error: Option<bool>,
pub _language: Option<String>,
pub show_line_numbers: Option<bool>,
pub show_language_selector: Option<bool>,
pub show_fullscreen: Option<bool>,
pub min_height: Option<u32>,
pub max_height: Option<u32>,
}Expand description
Props for the CodeInput component.
Code input component with syntax highlighting support
ยงRequired Props
- name:
impl Into<String>- Field name for the input
- value:
impl Into<Signal<FieldValue>>- Current value of the field
- _on_change:
impl Into<Callback<FieldValue>>- Callback when the value changes
ยงOptional Props
- placeholder:
impl Into<String>- Placeholder text
- required:
bool- Whether the field is required
- disabled:
bool- Whether the field is disabled
- class:
impl Into<String>- CSS classes
- error:
impl Into<String>- Error message to display
- has_error:
bool- Whether the field has an error
- _language:
impl Into<String>- Programming language for syntax highlighting
- show_line_numbers:
bool- Whether to show line numbers
- show_language_selector:
bool- Whether to show language selector
- show_fullscreen:
bool- Whether to show fullscreen toggle
- min_height:
u32- Minimum height in pixels
- max_height:
u32- Maximum height in pixels
Fieldsยง
ยงname: StringField name for the input
value: Signal<FieldValue>Current value of the field
_on_change: Callback<FieldValue>Callback when the value changes
placeholder: Option<String>Placeholder text
required: Option<bool>Whether the field is required
disabled: Option<bool>Whether the field is disabled
class: Option<String>CSS classes
error: Option<String>Error message to display
has_error: Option<bool>Whether the field has an error
_language: Option<String>Programming language for syntax highlighting
show_line_numbers: Option<bool>Whether to show line numbers
show_language_selector: Option<bool>Whether to show language selector
show_fullscreen: Option<bool>Whether to show fullscreen toggle
min_height: Option<u32>Minimum height in pixels
max_height: Option<u32>Maximum height in pixels
Implementationsยง
Sourceยงimpl CodeInputProps
impl CodeInputProps
Sourcepub fn builder() -> CodeInputPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> CodeInputPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building CodeInputProps.
On the builder, call .name(...), .value(...), ._on_change(...), .placeholder(...)(optional), .required(...)(optional), .disabled(...)(optional), .class(...)(optional), .error(...)(optional), .has_error(...)(optional), ._language(...)(optional), .show_line_numbers(...)(optional), .show_language_selector(...)(optional), .show_fullscreen(...)(optional), .min_height(...)(optional), .max_height(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of CodeInputProps.
Trait Implementationsยง
Auto Trait Implementationsยง
impl Freeze for CodeInputProps
impl RefUnwindSafe for CodeInputProps
impl Send for CodeInputProps
impl Sync for CodeInputProps
impl Unpin for CodeInputProps
impl UnsafeUnpin for CodeInputProps
impl UnwindSafe for CodeInputProps
Blanket Implementationsยง
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more