justjake / monorepo

GNU Affero General Public License v3.0
40 stars 2 forks source link

[notion-api] export ApiColor #6

Closed kungpaogao closed 2 years ago

kungpaogao commented 2 years ago

Context

I'm trying to write a function to parse/render data from the CMS and I would like to use the color data to apply styles. However, the color type isn't exported, so I can't write a function like:

function parseColor(color: ApiColor): string {
  switch (color) {
    ...
  }
}

Proposed changes

Export the ApiColor type

kungpaogao commented 2 years ago

nevermind, I got confused, ApiColor is from @notionhq/client: https://github.com/makenotion/notion-sdk-js/issues/280