2.0.2 • Published 1 year ago

@portaldx/plugin-positive-quotes v2.0.2

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
1 year ago

@portaldx/plugin-positive-quotes

Display a random positive quote message from "O Pensador".

This plugin was created through the Backstage CLI

Requirements

Install

yarn add @portaldx/plugin-positive-quotes

or

npm i @portaldx/plugin-positive-quotes

Use

app-config.yaml

[...]

proxy:
  '/positive-quotes':
    target: 'https://quotes-br.herokuapp.com/api/'
    changeOrigin: true
    allowedMethods: [GET, POST]
    pathRewrite:
      '^/api/proxy/positive-quotes/': '/'

[...]

routes.tsx

packages/app/src/routes.tsx

import { PositiveQuotesPage } from '@portaldx/plugin-positive-quotes';
// ...

const routes = (
  <FlatRoutes>
    // ...
    <Route path="/positive-quotes" element={<PositiveQuotesPage />} />
  </FlatRoutes>
);

Import the component where you want to use it:

src/components/common/WelcomeHeader/WelcomeHeader.tsx

import { PositiveQuoteText } from '@portaldx/plugin-positive-quotes';

// ...

const routes = (
  <>
    // ...
    <PositiveQuoteText />
  </>
);

Developed with ❤️ by the MadeiraMadeira DX Team