+ <>
+
+ A collection of buttons that should be used in the Backstage
+ interface. These leverage the properties inherited from{' '}
+
+ Material-UI Button
+
+ , but include an opinionated set that align to the Backstage design.
+
+
+
+
+
-
- >
+
+
+
+ Default Button:
+ This is the default button design which should be used in most cases.
+
+
color="primary" variant="contained"
+
+
+
+
+
+
+ Secondary Button:
+ Used for actions that cancel, skip, and in general perform negative
+ functions, etc.
+
+
color="secondary" variant="contained"
+
+
+
+
+
+
+ Tertiary Button:
+ Used commonly in a ButtonGroup and when the button function itself is
+ not a primary function on a page.
+
+
color="default" variant="outlined"
+
+
+
+
+
);
};
-export const PassProps = () => {
+export const ButtonLinks = () => {
const routeRef = createRouteRef({
path: '/hello',
title: 'Hi there!',
});
+ const handleClick = () => {
+ return 'Your click worked!';
+ };
+
return (
<>
-
- has props for both material-ui's component as well as for
- react-router-dom's
-
-
{routeRef.title}
-
+
+ {
+ // TODO: Refactor to use new routing mechanisms
+ }
+
+
+ has props for both Material-UI's component as well as for
+ react-router-dom's Route object.
+
+
+
+
+ links to a statically defined route. In general, this should be
+ avoided.
+
+
+
+
+ View URL
+
+ links to a defined URL using Material-UI's Button.
+
+
+
+
+ Trigger Event
+
+ triggers an onClick event using Material-UI's Button.
+
+
>
);
};
-PassProps.story = {
- name: `Accepts material-ui Button's and react-router-dom Link's props`,
-};