@linzjs/windows 10.2.0 → 10.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -150,3 +150,11 @@ dialog.LuiModalPrefab-file {
150
150
  padding-bottom: spacing.$unit-xs;
151
151
  }
152
152
  }
153
+
154
+ button.lui-button.lui-button-secondary.lui-button-secondary-error {
155
+ color: colors.$error;
156
+
157
+ span.LuiIcon svg * {
158
+ fill: colors.$error;
159
+ }
160
+ }
@@ -18,7 +18,7 @@ export type PrefabType = 'outline' | 'success' | 'info' | 'warning' | 'error' |
18
18
 
19
19
  export interface LuiModalAsyncPrefabButton<RT> {
20
20
  default?: boolean;
21
- level?: LuiButtonProps['level'];
21
+ level?: LuiButtonProps['level'] | 'secondary-error';
22
22
  title: string;
23
23
  icon?: IconName;
24
24
  value?: RT;
@@ -149,8 +149,11 @@ export const LuiModalPrefab = (props: PropsWithChildren<LuiModalAsyncPrefabProps
149
149
  {buttons.map((pf, i) => (
150
150
  <LuiButton
151
151
  key={i}
152
- level={pf.level ?? 'secondary'}
153
- className={clsx(pf.icon && 'lui-button-icon')}
152
+ level={pf.level === 'secondary-error' ? 'secondary' : (pf.level ?? 'secondary')}
153
+ className={clsx(
154
+ pf.icon && 'lui-button-icon',
155
+ pf.level === 'secondary-error' && 'lui-button-secondary-error',
156
+ )}
154
157
  onClick={() => {
155
158
  setDontShow();
156
159
  resolve(pf.value);
@@ -189,7 +192,7 @@ export const useLuiModalPrefab = () => {
189
192
  const { showModal, modalOwnerRef } = useShowAsyncModal();
190
193
 
191
194
  const showPrefabModal = useCallback(
192
- <RT = string>(props: PropsWithChildren<useLuiModalPrefabProps<RT>>): PromiseWithResolve<RT> => {
195
+ <RT = string,>(props: PropsWithChildren<useLuiModalPrefabProps<RT>>): PromiseWithResolve<RT> => {
193
196
  debugLog(`Show '${props.level}' prefab-modal '${props.title}'`, props);
194
197
  if (typeof props.children === 'string') {
195
198
  // Convert \n to <br/>
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "popout"
14
14
  ],
15
15
  "main": "./dist/index.ts",
16
- "version": "10.2.0",
16
+ "version": "10.3.0",
17
17
  "peerDependencies": {
18
18
  "@linzjs/lui": ">=23",
19
19
  "react": ">=18",