@linagora/twake-mui 5.0.0 → 5.1.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# @linagora/twake-mui [5.1.0](https://github.com/linagora/twake-ui/compare/@linagora/twake-mui@5.0.0...@linagora/twake-mui@5.1.0) (2026-09-01)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **twake-mui:** Add Apptitle component ([4e9cf51](https://github.com/linagora/twake-ui/commit/4e9cf51c3c7fbceeed3fb99cfac0a0028ee0b12f))
|
|
7
|
+
|
|
1
8
|
# @linagora/twake-mui [5.0.0](https://github.com/linagora/twake-ui/compare/@linagora/twake-mui@4.3.1...@linagora/twake-mui@5.0.0) (2026-08-31)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CalendarApp as Calendar, CalendarText, Camera, Chat, ChatText, Contacts, ContactText, Drive, DriveText, Mail, MailText, Notes, NoteText, Profile, ProText, VisioText } from '@linagora/twake-icons';
|
|
2
|
+
import { Box, Stack } from '@mui/material';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import AppTitle from './index';
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'AppTitle',
|
|
7
|
+
component: AppTitle,
|
|
8
|
+
parameters: { layout: 'centered' },
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
argTypes: {
|
|
11
|
+
appIcon: {
|
|
12
|
+
control: false,
|
|
13
|
+
description: 'Icon component for the app logo'
|
|
14
|
+
},
|
|
15
|
+
appTextIcon: {
|
|
16
|
+
control: false,
|
|
17
|
+
description: 'Icon component for the app text/name'
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
const appLogotypes = [
|
|
23
|
+
{ name: 'Calendar', icon: Calendar, textIcon: CalendarText },
|
|
24
|
+
{ name: 'Chat', icon: Chat, textIcon: ChatText },
|
|
25
|
+
{ name: 'Contacts', icon: Contacts, textIcon: ContactText },
|
|
26
|
+
{ name: 'Drive', icon: Drive, textIcon: DriveText },
|
|
27
|
+
{ name: 'Mail', icon: Mail, textIcon: MailText },
|
|
28
|
+
{ name: 'Notes', icon: Notes, textIcon: NoteText },
|
|
29
|
+
{ name: 'Pro', icon: Profile, textIcon: ProText },
|
|
30
|
+
{ name: 'Visio', icon: Camera, textIcon: VisioText }
|
|
31
|
+
];
|
|
32
|
+
export const Screenshot = {
|
|
33
|
+
tags: ['argos'],
|
|
34
|
+
render: () => (React.createElement(Stack, { spacing: 3 }, appLogotypes.map(app => (React.createElement(Box, { key: app.name },
|
|
35
|
+
React.createElement(AppTitle, { appIcon: app.icon, appTextIcon: app.textIcon }))))))
|
|
36
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Icon, TwakeText } from '@linagora/twake-icons';
|
|
2
|
+
import { Box, useTheme } from '@mui/material';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
const AppTitle = ({ appIcon, appTextIcon }) => {
|
|
5
|
+
const theme = useTheme();
|
|
6
|
+
const isLight = theme.palette.mode === 'light';
|
|
7
|
+
if (!appIcon || !appTextIcon)
|
|
8
|
+
return null;
|
|
9
|
+
const AppTextIcon = appTextIcon;
|
|
10
|
+
return (React.createElement(Box, { sx: { display: 'flex', alignItems: 'center', gap: 1 } },
|
|
11
|
+
React.createElement(Icon, { icon: appIcon, size: "32" }),
|
|
12
|
+
React.createElement(TwakeText, { height: "22", style: { fill: isLight ? '#000' : '#fff' } }),
|
|
13
|
+
React.createElement(AppTextIcon, { height: 22, style: { width: 'auto', fill: isLight ? '#000' : '#fff' } })));
|
|
14
|
+
};
|
|
15
|
+
export default AppTitle;
|