From 6cbd89fd09824dc8fde9976678f1adbba340ac34 Mon Sep 17 00:00:00 2001 From: Ceri Goff Date: Tue, 18 Apr 2023 11:41:19 -0500 Subject: [PATCH] add tags and labels Signed-off-by: Ceri Goff --- .../src/components/Card/styles.ts | 39 +++++++++++++++++++ .../src/utils/types.tsx | 8 ++++ 2 files changed, 47 insertions(+) create mode 100644 plugins/github-pull-requests-board/src/components/Card/styles.ts diff --git a/plugins/github-pull-requests-board/src/components/Card/styles.ts b/plugins/github-pull-requests-board/src/components/Card/styles.ts new file mode 100644 index 0000000000..2da12cb15e --- /dev/null +++ b/plugins/github-pull-requests-board/src/components/Card/styles.ts @@ -0,0 +1,39 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { makeStyles } from '@material-ui/core'; + +export const useFormClasses = makeStyles(() => ({ + labelItem: { + display: 'flex', + position: 'relative', + boxSizing: 'border-box', + textAlign: 'left', + alignItems: 'center', + paddingTop: 2, + paddingBottom: 2, + justifyContent: 'flex-start', + textDecoration: 'none', + paddingLeft: 2, + paddingRight: 2, + }, + tagBox: { + display: 'flex', + flexWrap: 'wrap', + alignItems: 'center', + maxWidth: 750, + }, +})); diff --git a/plugins/github-pull-requests-board/src/utils/types.tsx b/plugins/github-pull-requests-board/src/utils/types.tsx index 4c80052731..8a8ba7e171 100644 --- a/plugins/github-pull-requests-board/src/utils/types.tsx +++ b/plugins/github-pull-requests-board/src/utils/types.tsx @@ -76,6 +76,11 @@ export type Repository = { isArchived: boolean; }; +export type Labels = { + id: string; + name: string; +}; + export type PullRequest = { id: string; repository: Repository; @@ -89,6 +94,9 @@ export type PullRequest = { state: string; reviewDecision: ReviewDecision | null; isDraft: boolean; + labels: { + nodes: Labels[]; + }; createdAt: string; author: Author; };