Frontend ui no visible text

Hello!

I’ve got a basic button that opens a to external webpage. Everything works but the button itself, I can’t seem to get the text to apply visibly.

Inspecting the button in browser, the field is empty

Any suggestions?

import React from 'react';
import ForgeReconciler, { Button } from '@forge/react';
import { router } from '@forge/bridge';

const App = () => {
  const handleOpenPage = () => {
    router.open('https://example.com');
  };

  return (
    <Button text="Calendar" onClick={handleOpenPage} />
  );
};

ForgeReconciler.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>
);

Hi @Hohenheim to get the text to display you can use Button like

<Button onClick={handleOpenPage} >Calendar</Button>

text is not an available property for this component (see more info here)

2 Likes

Thank you @EmilyChiew this was the exact solution I needed

1 Like