Skip to content

Required options #2

Description

@scottcorgan

Idea


@joeosburn-desiringgod recommended I open these ideas here.

It's pretty helpful to be able to declare some options to be passed into the component as required. By default, they would be optional. This helps ensure that the errors don't send us in the wrong direction. This especially happens when we have nested components.

Example:

<%= icon(type: 'arrow') %>

Here, type is required because anything else doesn't make sense (there is no default value for this one). Display some sort of error like "The component 'icon' requires type to be defined" (or something similar) would make our components easier to use and learn.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions