seas-computing / mark-one

A UI component library for building React Apps (in development)
https://seas-computing.github.io/mark-one/
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Export DropdownOptionProps interface #135

Closed natalynyu closed 1 year ago

natalynyu commented 1 year ago

This DropdownOptionProps interface is being exported so that it can be used in Course Planner.

Describe your changes

Types of changes

Checklist:

Priority:

Related Issues:

Related to: #532

natalynyu commented 1 year ago

This looks great, but I think we might also want to include this interface in the export statement in src/Forms/index.ts in order for it to be importable.

I'm not sure that we have to export from index.ts for these interfaces, because for instance, DropdownProps is available for importing in Course Planner, but it's not being exported in index.ts:

image
rmainwork commented 1 year ago

Valid point. That's interesting...in my testing - I had to add DropdownOptionProps to index.ts in order for it to be importable.

rmainwork commented 1 year ago

Just to recap from what we talking about on the stand-up - it looks like you're DropdownProps is imported from mark-one/lib/Forms/Dropdown instead of the top level of mark-one. Since we probably want to import things from the top level mark-one package in general, we probably want to make sure we're exporting things from the top level

natalynyu commented 1 year ago

@rmainseas Makes total sense now! I originally thought it was a technical issue. I exported the two interfaces DropdownProps and DropdownOptionProps from index.ts so that we can import directly from mark-one. Thanks!

rmainwork commented 1 year ago

Yeah, somehow I didn't notice yesterday where the import was coming from and was trying to figure out why DropdownProps worked like that but DropdownOptionProps seemingly didn't.

It wasn't until @jonseitz pointed out the import path this morning that it clicked.

rmainwork commented 1 year ago

Anyway...this looks great now so I'm going to approve it.