Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Playroom): add icon keywords to playroom scope #918

Merged
merged 1 commit into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion playroom/use-scope.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import {useScreenSize, useTheme, skinVars} from '../src';
import curry from 'lodash/curry';
import iconKeywords from '../src/generated/mistica-icons/icons-keywords';

import type {Colors} from '../src/skins/types';
import type {Theme} from '../src/theme';
Expand Down Expand Up @@ -43,7 +44,12 @@ const usePlayroomState = () => {
};
};

const useScope = (): {theme: Theme; colors: Colors; rawColors: Colors} => {
const useScope = (): {
theme: Theme;
colors: Colors;
rawColors: Colors;
iconKeywords: typeof iconKeywords;
} => {
const theme = useTheme();
const screenSize = useScreenSize();
const playroomState = usePlayroomState();
Expand All @@ -52,6 +58,7 @@ const useScope = (): {theme: Theme; colors: Colors; rawColors: Colors} => {
theme,
colors: skinVars.colors,
rawColors: skinVars.rawColors,
iconKeywords,
...playroomState,
...screenSize,
};
Expand Down
4 changes: 2 additions & 2 deletions src/generated/mistica-icons/icons-keywords.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -381,15 +381,15 @@ const iconKeywords: {[key: string]: Array<string>} = {
],
audio: ['sound', 'audio signal', 'soundwave', 'sonido', 'sinal de áudio', 'Ton'],
aura: ['assistant', 'virtual', 'helper', 'aura', 'aura virtual', 'Helfer'],
'authentication-failure': [
'autentication-failure': [
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated change. It's just an update in Mistica design repo

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but it's a typo, isn't it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we added to 15.0.0 major version to solve this typo in some icons and avoid breaking changes now
#626

'login error',
'access denied',
'error de autenticación',
'acesso negado',
'Authentifizierungsfehler',
'Zugriff verweigert',
],
'authentication-success': [
'autentication-success': [
'login confirmation',
'access granted',
'confirmación de inicio de sesión',
Expand Down
Loading