Skip to content

sancarn/uiVBA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uiVBA

A stdVBA project to build a react-like set of UI components for VBA.

Current state

Very incomplete and doesn't adhere to vision very well.

Vision

Class Video
  Private Type TThis
    url as string
    title as string
    description as string
  End Type
  Private This as TThis

  'Constructors
  Public Function Create(ByVal sTitle as string, ByVal sDescription as string, ByVal sURL as string) as Video
    Set Create = new Video
    Call Create.protInit(sTitle, sDescription, sURL)
  End Function
  Public Sub protInit(ByVal sTitle as string, ByVal sDescription as string, ByVal sURL as string)
    This.url = sURL
    This.title = sTitle
    This.description = sDescription
  End Sub

  'Component
  Public Function Render(ui)
    With ui
      With .Add(uiDiv.Create())
        Call .Add(uiThumbnail.Create(this.url))
        With .Add(uiLink.Create(this.url))
          Call .Add(uiTitle.Create(content := this.title))
          Call .Add(uiParagraph.Create(content := this.description))
        End With
        Call .Add(uiLikeButton.Create(this.url))
      End With
    End With
  End Function
End Class

Analagous to

function Video({ video }) {
  return (
    <div>
      <Thumbnail video={video} />
      <a href={video.url}>
        <h3>{video.title}</h3>
        <p>{video.description}</p>
      </a>
      <LikeButton video={video} />
    </div>
  );
}

For some UI like:

image

About

Expansion of stdVBA to include UI components

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published