adventistchurch / alps-react

This React theme is an implementation of the Adventist Living Pattern System (ALPS) designed to support the work of the Seventh-day Adventist Church.
http://alps-react.adventist.io
Other
10 stars 6 forks source link

I need a declaration file. Not all components are exported #38

Open eli-sda opened 10 months ago

eli-sda commented 10 months ago

I'm trying to use alps-react library in my react project with typescript.

> npm i --save @types/alps-react npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/@types%2falps-react - Not found npm ERR! 404 npm ERR! 404 '@types/alps-react@*' is not in this registry.

Failed to compile.

Attempted import error: 'Body' is not exported from 'alps-react' (imported as 'Body').
ERROR in ./src/App.tsx 48:39-43
export 'Body' (imported as 'Body') was not found in 'alps-react' (possible exports: AlpsContextProvider, DrawerContextProvider, LinkContextProvider, breakpoints, breakpointsWidths, getExternalAssets)

ERROR in ./src/App.tsx 51:41-44
export 'Div' (imported as 'Div') was not found in 'alps-react' (possible exports: AlpsContextProvider, DrawerContextProvider, LinkContextProvider, breakpoints, breakpointsWidths, getExternalAssets)

ERROR in ./src/App.tsx 54:44-50
export 'Button' (imported as 'Button') was not found in 'alps-react' (possible exports: AlpsContextProvider, DrawerContextProvider, LinkContextProvider, breakpoints, breakpointsWidths, getExternalAssets)

ERROR in ./src/App.tsx 60:43-53
export 'MediaBlock' (imported as 'MediaBlock') was not found in 'alps-react' (possible exports: AlpsContextProvider, DrawerContextProvider, LinkContextProvider, breakpoints, breakpointsWidths, getExternalAssets)

ERROR in ./src/App.tsx 82:43-53
export 'Blockquote' (imported as 'Blockquote') was not found in 'alps-react' (possible exports: AlpsContextProvider, DrawerContextProvider, LinkContextProvider, breakpoints, breakpointsWidths, getExternalAssets)
eduludi commented 9 months ago

@eli-sda This project doesn't support TypeScripts and it's no longer is being maintained.

Maybe you can take a look at this other project that was build based on alps-react: https://github.com/adventistchurch/alps/tree/storybook (note that it's under the storybook branch of the alps project)

eli-sda commented 9 months ago

Thank you for the information, so I can install and use the components from storybook branch but as I see not all the components are exported (see https://github.com/adventistchurch/alps/blob/storybook/src/index.ts). Could, someone update the index.ts? Is it a problem that the branch is 779 commits behind v3.x?