Skip to content

Commit 3675cd8

Browse files
committed
feat: add missing properties
Signed-off-by: Guillaume Hivert <[email protected]>
1 parent b488d7c commit 3675cd8

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

src/sketch.gleam

+27-6
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@
268268
//// some access to underlying and internals, open an issue with your use case,
269269
//// I'd more than happy to help on that point and reduce side-effects.
270270

271+
import gleam/float
271272
import gleam/int
272273
import gleam/list
273274
import gleam/string
@@ -544,8 +545,8 @@ pub fn object_position(object_position: String) {
544545
Property("object-position", object_position, False)
545546
}
546547

547-
pub fn opacity(opacity: String) {
548-
Property("opacity", opacity, False)
548+
pub fn opacity(opacity: Float) {
549+
Property("opacity", float.to_string(opacity), False)
549550
}
550551

551552
pub fn pointer_events(pointer_events: String) {
@@ -876,19 +877,39 @@ pub fn border_radius_(border_radius: String) {
876877
Property("border-radius", border_radius, False)
877878
}
878879

879-
pub fn border_top_right_radius(border_top_right_radius: String) {
880+
pub fn border_top_right_radius(border_top_right_radius: Size) {
881+
size.to_string(border_top_right_radius)
882+
|> Property("border-top-right-radius", _, False)
883+
}
884+
885+
pub fn border_top_left_radius(border_top_left_radius: Size) {
886+
size.to_string(border_top_left_radius)
887+
|> Property("border-top-left-radius", _, False)
888+
}
889+
890+
pub fn border_bottom_right_radius(border_bottom_right_radius: Size) {
891+
size.to_string(border_bottom_right_radius)
892+
|> Property("border-bottom-right-radius", _, False)
893+
}
894+
895+
pub fn border_bottom_left_radius(border_bottom_left_radius: Size) {
896+
size.to_string(border_bottom_left_radius)
897+
|> Property("border-bottom-left-radius", _, False)
898+
}
899+
900+
pub fn border_top_right_radius_(border_top_right_radius: String) {
880901
Property("border-top-right-radius", border_top_right_radius, False)
881902
}
882903

883-
pub fn border_top_left_radius(border_top_left_radius: String) {
904+
pub fn border_top_left_radius_(border_top_left_radius: String) {
884905
Property("border-top-left-radius", border_top_left_radius, False)
885906
}
886907

887-
pub fn border_bottom_right_radius(border_bottom_right_radius: String) {
908+
pub fn border_bottom_right_radius_(border_bottom_right_radius: String) {
888909
Property("border-bottom-right-radius", border_bottom_right_radius, False)
889910
}
890911

891-
pub fn border_bottom_left_radius(border_bottom_left_radius: String) {
912+
pub fn border_bottom_left_radius_(border_bottom_left_radius: String) {
892913
Property("border-bottom-left-radius", border_bottom_left_radius, False)
893914
}
894915

0 commit comments

Comments
 (0)