@@ -1,13 +1,27 @@
|
||||
# org-react
|
||||
|
||||
Welcome to the org-react plugin!
|
||||
## features
|
||||
|
||||
_This plugin was created through the Backstage CLI_
|
||||
- Group list picker component
|
||||
|
||||
## Getting started
|
||||
### GroupListPicker
|
||||
|
||||
Your plugin has been added to the example app in this repository, meaning you'll be able to access it by running `yarn start` in the root directory, and then navigating to [/org-react](http://localhost:3000/org-react).
|
||||
The `GroupListPicker` component displays a select box which also has autocomplete functionality.
|
||||
|
||||
You can also serve the plugin in isolation by running `yarn start` in the plugin directory.
|
||||
This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads.
|
||||
It is only meant for local development, and the setup for it can be found inside the [/dev](./dev) directory.
|
||||
To use the `GroupListPicker` component you'll need to import it and add it to your desired place.
|
||||
|
||||
```diff
|
||||
+ import { GroupListPicker } from '@backstage/plugin-org-react';
|
||||
|
||||
<Grid container spacing={3}>
|
||||
<Grid item xs={12}>
|
||||
+ <GroupListPicker groupTypes={['team']} defaultGroup='team-a' placeholder='Search for a team' />
|
||||
</Grid>
|
||||
</Grid>
|
||||
```
|
||||
|
||||
The `GroupListPicker` comes with three optional props:
|
||||
|
||||
- **groupTypes**: gives the user the option which group types the component should load. If no value is provided all group types will be loaded in;
|
||||
- **defaultGroup**: which group by default should be selected. For example, a group of the logged in user;
|
||||
- **placeholder**: the placeholder that the select box in the component should display. This might be helpfull in informing your users what the functionality of the component is.
|
||||
|
||||
Reference in New Issue
Block a user