Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: Add concept of enum values to language core #28

Open
grebaldi opened this issue Jul 3, 2023 · 0 comments
Open

FEATURE: Add concept of enum values to language core #28

grebaldi opened this issue Jul 3, 2023 · 0 comments
Milestone

Comments

@grebaldi
Copy link
Member

grebaldi commented Jul 3, 2023

Declaration:

export enum HeadlineVariant {
  REGULAR({
    className: "text-xl text-gray"
  })
  CTA({
    className: "text-xxl text-red"
  })
}

Usage:

export component Headline {
  variant: HeadlineVariant
  text: string

  return <h1 className={variant.className}>{text}</h1>
}
@grebaldi grebaldi added this to the v1.0 milestone Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant