@bitrise/bitkit 10.3.0 → 10.4.1

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.
@@ -1,34 +0,0 @@
1
- .Ribbon {
2
- border: solid transparent;
3
- border-width: 0.0625rem 0;
4
- }
5
-
6
- .Ribbon--type-alert {
7
- border-color: var(--color-red--3);
8
- background-color: var(--color-red--1);
9
- color: var(--color-red--4);
10
- }
11
-
12
- .Ribbon--type-inform {
13
- border-color: var(--color-blue--2);
14
- background-color: var(--color-blue--1);
15
- color: var(--color-blue--4);
16
- }
17
-
18
- .Ribbon--type-progress {
19
- border-color: var(--color-grape--2);
20
- background-color: var(--color-grape--1);
21
- color: var(--color-eggplant);
22
- }
23
-
24
- .Ribbon--type-success {
25
- border-color: var(--color-green--2);
26
- background-color: var(--color-green--1);
27
- color: var(--color-green--5);
28
- }
29
-
30
- .Ribbon--type-warning {
31
- border-color: var(--color-yellow--3);
32
- background-color: var(--color-yellow--1);
33
- color: var(--color-yellow--5);
34
- }
@@ -1,50 +0,0 @@
1
- import * as React from 'react';
2
- import classnames from 'classnames';
3
- import Flex, { Props as FlexProps } from '../Flex/Flex';
4
- import Icon from '../../Components/Icon/Icon';
5
- import Link from '../../Components/Link/Link';
6
- import './Ribbon.css';
7
- import Base from '../Base/Base';
8
-
9
- type TypeRibbonType = 'alert' | 'inform' | 'progress' | 'success' | 'warning';
10
-
11
- export interface Props extends FlexProps {
12
- /**
13
- * A callback to remove the ribbon, that when provided will
14
- * render a clickable cross, that when clicked will call the given
15
- * function.
16
- */
17
- onRemove?: (e: React.SyntheticEvent) => void;
18
- /**
19
- * The type of the ribbon that affects the styling.
20
- */
21
- type: TypeRibbonType;
22
- }
23
-
24
- /**
25
- * Ribbon component used to inform the user of something system wide important message.
26
- */
27
- const Ribbon: React.FunctionComponent<Props> = (props: Props) => {
28
- const { children, type, onRemove, ...rest } = props;
29
-
30
- const classes = classnames('Ribbon', `Ribbon--type-${type}`);
31
-
32
- return (
33
- <Flex {...rest} className={classes} direction="horizontal" gap="x2" paddingHorizontal="x6" paddingVertical="x4">
34
- {onRemove && <Base width="1.5rem" />}
35
- <Flex grow initial="none">
36
- {children}
37
- </Flex>
38
- {onRemove && (
39
- <Flex>
40
- {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
41
- <Link as="button" onClick={onRemove}>
42
- <Icon name="CloseSmall" />
43
- </Link>
44
- </Flex>
45
- )}
46
- </Flex>
47
- );
48
- };
49
-
50
- export default Ribbon;