Skip to content

Commit bf0068a

Browse files
authored
Make component public (#983)
1 parent e725b1f commit bf0068a

File tree

6 files changed

+12
-8
lines changed

6 files changed

+12
-8
lines changed

pgml-apps/cargo-pgml-components/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pgml-apps/cargo-pgml-components/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cargo-pgml-components"
3-
version = "0.1.12"
3+
version = "0.1.13"
44
edition = "2021"
55
authors = ["PostgresML <team@postgresml.org>"]
66
license = "MIT"

pgml-apps/cargo-pgml-components/src/components/component.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ pub struct Component {
1010
pub value: String,
1111
}
1212

13+
#[macro_export]
1314
macro_rules! component {
1415
($name:tt) => {
1516
impl From<$name> for crate::components::Component {
@@ -36,7 +37,8 @@ macro_rules! component {
3637
};
3738
}
3839

39-
pub(crate) use component;
40+
41+
pub use component;
4042

4143
// Render any string.
4244
impl From<&str> for Component {

pgml-apps/cargo-pgml-components/src/frontend/templates/mod.rs.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// You shouldn't modify it manually.
33

44
<% if root { %>
5-
mod component;
6-
pub(crate) use component::{component, Component};
5+
pub mod component;
6+
pub use component::{component, Component};
77
<% } %>
88
<% for component in modules.iter() { %>
99
// <%= component.full_path() %>

pgml-dashboard/src/components/component.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ pub struct Component {
1010
pub value: String,
1111
}
1212

13+
#[macro_export]
1314
macro_rules! component {
1415
($name:tt) => {
1516
impl From<$name> for crate::components::Component {
@@ -36,7 +37,8 @@ macro_rules! component {
3637
};
3738
}
3839

39-
pub(crate) use component;
40+
41+
pub use component;
4042

4143
// Render any string.
4244
impl From<&str> for Component {

pgml-dashboard/src/components/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// This file is automatically generated.
22
// You shouldn't modify it manually.
33

4-
mod component;
5-
pub(crate) use component::{component, Component};
4+
pub mod component;
5+
pub use component::{component, Component};
66

77
// src/components/breadcrumbs
88
pub mod breadcrumbs;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy