import { QuestionsBuilder } from "../base"; import { IBuilder } from "../types"; class ReactComponentQuestionsBuilder extends QuestionsBuilder implements IBuilder{ build() { return [ { type: "list", name: "reactComponentType", message: "What type of component do you need?", default: 0, choices: [ { name: "sub-component - choose if you want to create a reusable component that needs to be instantiated anywhere in your JSX where you want the component to be rendered. ", value: "sub-component", short: "sub-component - not connected to Redux", }, { name: "screen - screens are connected to Redux", value: "screen", short: "screen", }, { name: "library component - choose if you want to create a reusable component that is only instantiated once in JSX and can thereafter be manipulated from anywhere in the application. Examples include: alert modal , footer bar , header bar...", value: "library-component", short: "library component - connected to Redux", }, ], }, { type: "list", name: "isCustom", message: "Where will this component be used?", default: 0, choices: [ { name: "Only this project", value: true, short: "this project", }, { name: "Probably also on future projects", value: false, short: "future projects too", }, ], }, ]; } } export { ReactComponentQuestionsBuilder };