Skip to content

Commit 2dfca78

Browse files
authored
Merge branch 'main' into fix/warning-icon-triangle-solid-naming
2 parents 2bf8bae + 979c621 commit 2dfca78

File tree

6 files changed

+57
-31
lines changed

6 files changed

+57
-31
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# [1.9.0](https://github.com/input-output-hk/lace-ui-toolkit/compare/v1.8.0...v1.9.0) (2024-07-11)
2+
3+
4+
### Features
5+
6+
* change message property type for info bar component ([7a0b7fd](https://github.com/input-output-hk/lace-ui-toolkit/commit/7a0b7fd3d6f0eff6c4b6b0e4b483c1b0b131912e))
7+
8+
# [1.8.0](https://github.com/input-output-hk/lace-ui-toolkit/compare/v1.7.0...v1.8.0) (2024-07-11)
9+
10+
11+
### Features
12+
13+
* add limited px prop to text link component [LW-10645] ([f9150cf](https://github.com/input-output-hk/lace-ui-toolkit/commit/f9150cfe359945f781c08692bfccbd5c192bd710))
14+
115
# [1.7.0](https://github.com/input-output-hk/lace-ui-toolkit/compare/v1.6.0...v1.7.0) (2024-07-10)
216

317

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@input-output-hk/lace-ui-toolkit",
3-
"version": "1.7.0",
3+
"version": "1.9.0",
44
"description": "Lace UI Toolkit",
55
"homepage": "https://github.com/input-output-hk/lace-ui-toolkit/blob/main/README.md",
66
"bugs": {

src/design-system/info-bar/info-bar.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Text } from '../text';
99
import * as cx from './info-bar.css';
1010

1111
export interface Props {
12-
message: string;
12+
message: ReactNode;
1313
icon: ReactNode;
1414
callToAction?: {
1515
label?: string;

src/design-system/text-link/text-link.component.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from 'react';
22

33
import classNames from 'classnames';
44

5+
import { spacing } from '../../design-tokens';
56
import { Flex } from '../flex';
67
import { Text } from '../text';
78

@@ -12,10 +13,12 @@ import type { OmitClassName } from '../../types';
1213
export type Props = OmitClassName<'a'> & {
1314
disabled?: boolean;
1415
label?: string;
16+
px?: keyof typeof spacing;
1517
};
1618

1719
export const TextLink = ({
1820
disabled = false,
21+
px = '$8',
1922
label,
2023
...props
2124
}: Readonly<Props>): JSX.Element => {
@@ -26,6 +29,7 @@ export const TextLink = ({
2629
className={classNames(cx.button, cx.container)}
2730
alignItems="center"
2831
justifyContent="center"
32+
px={px}
2933
>
3034
<Flex alignItems="center" justifyContent="center">
3135
<Text.Button

src/design-system/text-link/text-link.css.ts

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,34 @@
1-
import { sx, style, vars, createVar, globalStyle } from '../../design-tokens';
1+
import { style, vars, createVar, globalStyle } from '../../design-tokens';
22

33
export const button = style({});
44

55
export const borderGap = createVar();
66

7-
export const container = style([
8-
sx({
9-
px: '$8',
10-
}),
11-
{
12-
border: 'none',
13-
outline: 'none',
14-
position: 'relative',
15-
zIndex: 1,
16-
cursor: 'pointer',
17-
display: 'inline-flex',
18-
19-
vars: {
20-
[borderGap]: '2px',
21-
},
7+
export const container = style({
8+
border: 'none',
9+
outline: 'none',
10+
position: 'relative',
11+
zIndex: 1,
12+
cursor: 'pointer',
13+
display: 'inline-flex',
2214

23-
selectors: {
24-
'&[aria-disabled="true"]': {
25-
opacity: vars.opacities.$0_24,
26-
},
15+
vars: {
16+
[borderGap]: '2px',
17+
},
2718

28-
'&:focus:not(:active)': {
29-
outlineColor: `${vars.colors.$buttons_secondary_container_outlineColor}`,
30-
outlineWidth: vars.spacing.$4,
31-
outlineStyle: 'solid',
32-
borderRadius: vars.spacing.$4,
33-
},
19+
selectors: {
20+
'&[aria-disabled="true"]': {
21+
opacity: vars.opacities.$0_24,
22+
},
23+
24+
'&:focus:not(:active)': {
25+
outlineColor: `${vars.colors.$buttons_secondary_container_outlineColor}`,
26+
outlineWidth: vars.spacing.$4,
27+
outlineStyle: 'solid',
28+
borderRadius: vars.spacing.$4,
3429
},
3530
},
36-
]);
31+
});
3732

3833
export const label = style([
3934
{

src/design-system/text-link/text-link.stories.tsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import type { Meta } from '@storybook/react';
44

55
import { Variants, Section, page, UIStateTable } from '../decorators';
66
import { Grid, Cell } from '../grid';
7+
import { Text } from '../text';
78

89
import { TextLink } from './text-link.component';
910

@@ -15,7 +16,7 @@ export default {
1516
decorators: [page({ title: 'Text Link', subtitle })],
1617
} as Meta;
1718

18-
const Buttons = (): JSX.Element => (
19+
const TextLinkExamples = (): JSX.Element => (
1920
<>
2021
<Variants.Row>
2122
<Variants.Cell>
@@ -69,10 +70,22 @@ export const Overview = (): JSX.Element => (
6970
<Cell>
7071
<Section title="Main components">
7172
<UIStateTable>
72-
<Buttons />
73+
<TextLinkExamples />
7374
</UIStateTable>
7475
</Section>
7576
</Cell>
77+
<Cell>
78+
<Section title="Usage Examples">
79+
<Text.Body.Normal>
80+
This is an example of a text link in the
81+
<TextLink px="$4" label="middle" />
82+
of a text using horizontal padding (default).
83+
</Text.Body.Normal>
84+
</Section>
85+
</Cell>
86+
<Cell>
87+
<TextLink px="$0" label="Example without horizontal padding" />
88+
</Cell>
7689
</Grid>
7790
);
7891

0 commit comments

Comments
 (0)