@tactics/toddle-styleguide 1.7.4 → 1.7.5
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/package.json +1 -1
- package/src/components/molecules/inline-notice/inline-notice.component.tsx +27 -0
- package/src/components/molecules/inline-notice/inline-notice.preview.tsx +20 -0
- package/src/components/molecules/inline-notice/inline-notice.styles.d.ts +18 -0
- package/src/components/molecules/inline-notice/inline-notice.styles.js +22 -0
- package/src/models/time-slot-sequence.ts +9 -0
package/package.json
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {useContext} from 'react';
|
|
3
|
+
|
|
4
|
+
import {ThemeCtx} from '../../../context/theme.context';
|
|
5
|
+
import {View} from 'react-native';
|
|
6
|
+
import {Stylesheet} from './inline-notice.styles';
|
|
7
|
+
import {SmallText} from '../../atoms/paragraph-components';
|
|
8
|
+
import { Icon } from '../../../icons';
|
|
9
|
+
|
|
10
|
+
type InlineNoticeProps = {
|
|
11
|
+
label: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const InlineNotice = ({label}: InlineNoticeProps) => {
|
|
15
|
+
const context = useContext(ThemeCtx);
|
|
16
|
+
const styles = Stylesheet(context);
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<View style={styles.container}>
|
|
20
|
+
<Icon name='exclamation-circle' style='regular' color={context.colors.ui.warning.dark} />
|
|
21
|
+
<SmallText addStyle={styles.label} textColor={context.colors.ui.warning.dark}>
|
|
22
|
+
{label}
|
|
23
|
+
</SmallText>
|
|
24
|
+
</View>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
export {InlineNotice as InlineNotice};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InlineNotice } from './inline-notice.component';
|
|
3
|
+
const {View} = require('react-native');
|
|
4
|
+
|
|
5
|
+
export const InlineNoticePreview = ({}: {}) => {
|
|
6
|
+
return (
|
|
7
|
+
<View
|
|
8
|
+
style={{
|
|
9
|
+
flex: 1,
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
justifyContent: 'center',
|
|
12
|
+
backgroundColor: 'white',
|
|
13
|
+
}}
|
|
14
|
+
>
|
|
15
|
+
<InlineNotice
|
|
16
|
+
label={'Deze dag is reeds gefactureerd. U kan deze enkel nog aanpassen in de beheerssoftware.'}
|
|
17
|
+
/>
|
|
18
|
+
</View>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export function Stylesheet(context: any): {
|
|
2
|
+
container: {
|
|
3
|
+
flexDirection: "row";
|
|
4
|
+
gap: number;
|
|
5
|
+
width: "100%";
|
|
6
|
+
backgroundColor: any;
|
|
7
|
+
borderRadius: number;
|
|
8
|
+
alignItems: "center";
|
|
9
|
+
justifyContent: "flex-start";
|
|
10
|
+
paddingLeft: number;
|
|
11
|
+
paddingTop: number;
|
|
12
|
+
paddingRight: number;
|
|
13
|
+
paddingBottom: number;
|
|
14
|
+
};
|
|
15
|
+
label: {
|
|
16
|
+
flex: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {StyleSheet} from 'react-native';
|
|
2
|
+
import {Scale} from '../../../theme/scale';
|
|
3
|
+
|
|
4
|
+
export const Stylesheet = (context) =>
|
|
5
|
+
StyleSheet.create({
|
|
6
|
+
container: {
|
|
7
|
+
flexDirection: 'row',
|
|
8
|
+
gap: Scale.m,
|
|
9
|
+
width: '100%',
|
|
10
|
+
backgroundColor: context.colors.ui.error.xlight,
|
|
11
|
+
borderRadius: Scale.s,
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
justifyContent: 'flex-start',
|
|
14
|
+
paddingLeft: Scale.m,
|
|
15
|
+
paddingTop: Scale.m,
|
|
16
|
+
paddingRight: Scale.m,
|
|
17
|
+
paddingBottom: Scale.m,
|
|
18
|
+
},
|
|
19
|
+
label: {
|
|
20
|
+
flex: 1
|
|
21
|
+
}
|
|
22
|
+
});
|