Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
beyaz committed Feb 9, 2024
1 parent 994c22c commit 74b497c
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions ReactWithDotNet.WebSite/Components/HamburgerButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ class HamburgerButton : Component

protected override Element render()
{
var transition = Transition("all 0.2s ease 0s");

return new button(DisplayFlexRowCentered, OnClick(Click))
{
Border(Solid(1,Theme.grey_300)),
Expand All @@ -17,24 +19,24 @@ protected override Element render()
When(IsOpen,Background(Theme.grey_50)),

Padding(8),
new svg(svg.Width(16),svg.Height(16), svg.ViewBox(0, 0, 16, 16), svg.Fill("none"))
new svg(svg.Width(16),svg.Height(16), svg.ViewBox(0, 0, 16, 16), svg.Fill(none))
{
new rect(Transition("all 0.2s ease 0s"), When(IsOpen, Transform("translate(6px, -2px) rotateZ(45deg)")))
new rect(transition, When(IsOpen, Transform("translate(6px, -2px) rotateZ(45deg)")))
{
x = "1",
y = "5",
width = "14",
height = "1.5",
rx = "1",
x = 1,
y = 5,
width = 14,
height = 1.5,
rx = 1,
fill = Theme.primary_main
},
new rect(Transition("all 0.2s ease 0s"), When(IsOpen, Transform("translate(-5px, 6px) rotateZ(-45deg)")))
new rect(transition, When(IsOpen, Transform("translate(-5px, 6px) rotateZ(-45deg)")))
{
x = "1",
y = "9",
width = "14",
height = "1.5",
rx = "1",
x = 1,
y = 9,
width = 14,
height = 1.5,
rx = 1,
fill = Theme.primary_main
}
}
Expand Down

0 comments on commit 74b497c

Please sign in to comment.