Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhancement: Divider component #792

Open
marc2332 opened this issue Jul 14, 2024 · 3 comments
Open

enhancement: Divider component #792

marc2332 opened this issue Jul 14, 2024 · 3 comments
Assignees
Labels
enhancement 🔥 New feature or request

Comments

@marc2332
Copy link
Owner

No description provided.

@marc2332 marc2332 added the enhancement 🔥 New feature or request label Jul 14, 2024
@reyamir
Copy link

reyamir commented Jul 15, 2024

this is my divider component

#[derive(Clone, PartialEq)]
pub enum Direction {
	VERTICAL,
	HORIZONTAL,
}

#[component]
pub fn Divider(background: String, direction: Direction) -> Element {
	match direction {
		Direction::VERTICAL => rsx!(
			rect {
				width: "1",
				height: "100%",
				background: background,
			}
		),
		Direction::HORIZONTAL => rsx!(
			rect {
				width: "100%",
				height: "1",
				background: background,
			}
		)
	}
}

@hydra
Copy link

hydra commented Aug 30, 2024

@marc2332
Copy link
Owner Author

@marc2332 marc2332 self-assigned this Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🔥 New feature or request
Projects
Status: Todo
Development

No branches or pull requests

3 participants