@@ -7,14 +7,14 @@ import { useWorkPackage } from "../hooks/useWorkPackage";
77import { useWorkPackageSearch } from "../hooks/useWorkPackageSearch" ;
88import type { WorkPackage } from "../openProjectTypes" ;
99import { linkToWorkPackage } from "../services/openProjectApi" ;
10- import { defaultVariables , useColors } from "../services/colors" ;
10+ import { useColors } from "../services/colors" ;
1111import { getAliases } from "../services/slashMenuAliases" ;
1212import { useTranslation } from "react-i18next" ; // localize react components
1313import i18n from "../services/i18n.ts" ; // localize other code
1414
1515import { LinkIcon , SearchIcon } from "@primer/octicons-react" ;
16- import { SPACER_S , SPACER_M , SPACER_L , SPACER_XL } from "../services/css_constants" ;
1716import { WorkPackageElement } from "../elements/workPackageElement" ;
17+ import { UnavailableWorkPackageElement } from "../elements/unavailableWorkPackageElement" ;
1818import styled from "styled-components" ;
1919
2020const Block = styled . div . attrs ( {
@@ -89,53 +89,18 @@ const DropdownOption = styled.div.attrs({
8989 background-color: ${ ( { selected } ) => selected ? 'var(--highlight-wp-background)' : 'var(--bn-colors-menu-background)' } ;
9090 border: none;
9191 border-radius: var(--bn-border-radius-small);
92- margin: ${ SPACER_S } 0;
93- padding: 0 ${ SPACER_M } ;
92+ margin: var(--spacer-s) 0;
93+ padding: 0 var(--spacer-m) ;
9494 cursor: pointer;
9595` ;
9696
97- const UnavailableWorkPackage = styled . div . attrs ( {
98- className : 'op-bn-work-package-placeholder'
99- } ) `
100- ${ defaultVariables }
101- padding: ${ SPACER_M } ${ SPACER_L } ;
102- background-color: var(--highlight-wp-background);
103- border-radius: var(--bn-border-radius-small);
104- ` ;
105-
106- const UnavailableMessage = styled . div . attrs ( {
107- className : 'op-bn-unavailable-message'
108- } ) `
109- color: var(--bn-colors-editor-text) !important;
110- `
111-
112- const UnavailableMessageHeader = styled . div . attrs ( {
113- className : 'op-bn-unavailable-message--header'
114- } ) `
115- font-weight: 600;
116- color: var(--bn-colors-editor-text) !important;
117- `
118-
11997interface BlockProps {
12098 id : string ,
12199 props : {
122100 wpid : string ;
123101 } ;
124102}
125103
126- const UnavailableWorkPackageElement = ( { header, message } : { header : string , message : string } ) => {
127- return (
128- < UnavailableWorkPackage >
129- < UnavailableMessage >
130- < UnavailableMessageHeader >
131- { header }
132- </ UnavailableMessageHeader >
133- { message }
134- </ UnavailableMessage >
135- </ UnavailableWorkPackage >
136- )
137- }
138-
139104const OpenProjectWorkPackageBlockComponent = ( {
140105 block,
141106 editor,
0 commit comments