Skip to content

Commit

Permalink
feat: add Rubik's cube
Browse files Browse the repository at this point in the history
  • Loading branch information
Vtec234 committed Feb 2, 2023
1 parent 87dcb60 commit aa4bec8
Show file tree
Hide file tree
Showing 5 changed files with 1,259 additions and 15 deletions.
16 changes: 16 additions & 0 deletions WidgetKit/Demos/Rubiks.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import WidgetKit.Component.HtmlDisplay

open Lean WidgetKit
open scoped WidgetKit.Jsx

structure RubiksProps where
seq : Array String := #[]
deriving ToJson, FromJson, Inhabited

@[widget_module]
def Rubiks : Component RubiksProps where
javascript := include_str ".." / ".." / "build" / "js" / "rubiks.js"

def eg := #["L", "L", "D⁻¹", "U⁻¹", "L", "D", "D", "L", "U⁻¹", "R", "D", "F", "F", "D"]

#html <Rubiks seq={eg} />
Loading

0 comments on commit aa4bec8

Please sign in to comment.