Skip to content
Snippets Groups Projects
Unverified Commit 4066c696 authored by databasedav's avatar databasedav Committed by GitHub
Browse files

add default derive to buffer unit components (#143)

parent 72146cc5
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@ impl Default for CosmicTextAlign {
/// Tag component to disable writing to a [`CosmicBuffer`]
// TODO: Code example
#[derive(Component)]
#[derive(Component, Default)]
pub struct ReadOnly; // tag component
/// Internal value used to decide what section of a [`Buffer`] to render
......
......@@ -11,7 +11,7 @@ impl Plugin for UserSelectPlugin {
/// Tag component to disable user selection
/// Like CSS `user-select: none` https://developer.mozilla.org/en-US/docs/Web/CSS/user-select
#[derive(Component)]
#[derive(Component, Default)]
pub struct UserSelectNone;
fn clear_selection(mut q: Query<&mut CosmicEditor, With<UserSelectNone>>) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment