yew_styles/
lib.rs

1//! # Yew Styles
2//!
3//! Yew Styles is a style framework for [yew](https://yew.rs/docs/en/intro/) without JavaScript dependencies
4//!
5//! ## Motivation
6//! The purpose of developing this project is first,
7//! provide a style framework for yew that doesn't require any JavaScript dependencies
8//! also to create a layout system which is not far of the flexbox concept, and,
9//! to take the rust benefits and implement properties selected by enumeration
10//! in the most of the cases which makes fast for developing applications and avoids the practice try and error
11//!
12//! ## How it works
13//! Each component is split in two parts, the logical yew component and its sass module,
14//! however, it is not necessary to worry about the sass module only it needs to be include in the project
15//!
16//! ### How install it
17//! 1. Install the sass module: `npm install yew-styles`
18//! 2. Add the yew_style crate with the features needed for your project in Cargo.toml file:
19//! ```toml
20//! yew_styles = { version="0.11", features=["button", "text", "navbar"] }
21//! ```
22//! 3. Import the main.css file in you main javascript/typescript file project:
23//! ```typescript
24//!     import 'node_modules/yew-styles/main.css';
25//! ```
26//! 4. Ready to import and use in your project 🚀
27//!
28//! ## Run the documentation page
29//! 1. `git clone https://github.com/spielrs/yew_styles.git`
30//! 2. `cd yew_styles`
31//! 3. `npm start`
32//!
33//! In the left side there is a list of links where each one access to a correspondent component documentation,
34//! there, shows how to use it.
35//!
36//! ## Run the tests
37//! Inside of the project run:
38//!
39//! `cargo test --target wasm32-unknown-unknown --manifest-path=crate/yew_styles/Cargo.toml`
40//!
41//! ## Development phase
42//! Yew Styles cover all the common cases used in a web application however there are still a lot of work to do and components to implement.
43//! All contributions are appreciated.
44//!
45//! ## How contribute
46//! First, open an issue describing about the fix, improvement or implementation and as suggestion, don't start to work in it until that is discussed.
47//! If the contribution is a fix or small improvement in a component, only a pull request to master explaining what resolve or improve that, is required.
48//! If it is an implementation, please follow the next requirements:
49//!
50//! * Firstable open and issue describing about the component
51//! * Unit tests, which checks that the component is created and
52//! its logic works, in the same file where it is implemented (test events is not needed for now)
53//! * One component per file, if multiple components have connections between them, it is possible create subfolder
54//! * Documentation in the component showing an example of using it and small description of each prop
55//! * Create a component page in `/crate/src/page` with the same structure than the rest of the components
56#![recursion_limit = "512"]
57mod components;
58pub mod styles;
59mod utils;
60
61#[cfg(feature = "button")]
62pub use components::button;
63#[cfg(feature = "card")]
64pub use components::card;
65#[cfg(feature = "carousel")]
66pub use components::carousel;
67#[cfg(feature = "dropdown")]
68pub use components::dropdown;
69#[cfg(feature = "forms")]
70pub use components::forms;
71#[cfg(feature = "layouts")]
72pub use components::layouts;
73#[cfg(feature = "modal")]
74pub use components::modal;
75#[cfg(feature = "navbar")]
76pub use components::navbar;
77#[cfg(feature = "spinner")]
78pub use components::spinner;
79#[cfg(feature = "text")]
80pub use components::text;
81#[cfg(feature = "tooltip")]
82pub use components::tooltip;